Streamlining IO with C

Chapter 3 - Writing, Compiling, and Debugging Simple Programs

Visual C++ 6: The Complete Reference
Chris H. Pappas and William H. Murray, III
  Copyright 1998 The McGraw-Hill Companies

Saving Files
There is usually a major conflict between you and the compiler. You think that you write flawless code, while the compiler believes otherwise. If that insult is not bad enough, there’s the linker’s impression of your algorithmic genius. However, the final blow to your ego comes from the microprocessor itself, which, after being passed an executable file filtered by both the compiler and the linker, chokes on your digital instructions.
Although disagreements between you and the compiler or the linker are not catastrophic, disagreements between you and the microprocessor are. So, here’s the moral to this story: Save your file before you compile, before you link, and definitely before you try to run a program. Many a sad story has been told of a programmer who runs an unsaved file, crashes the application or the system, and then has to reenter the entire program.
If you have not already done so, save the example program you are working with. You can do so by either clicking on the third button from the left on the toolbar (the picture on this button looks like a 3 1/2-inch floppy disk), using the File | Save command, or pressing ctrl-s.
The first time you save a file, the IDE will present you with a Save dialog box. Save this file under the name ERROR.C.
Figure 3-3 shows the edit window as it looks just before the file is saved. After the file is saved, the title in the title bar will show the saved file’s name.
Figure 3-3: The Visual C++ edit window previous to saving a file for the first time

Books24x7.com, Inc 2000 –  


Visual C++ 6(c) The Complete Reference
Visual Studio 6: The Complete Reference
ISBN: B00007FYGA
EAN: N/A
Year: 1998
Pages: 207

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net