Sams Teach Yourself C in 21 Days

(singke) #1
.cpp (C++) extension. Save the sample file as Sample. By selecting the C source
file option, a .c extension will automatically be added. Once you have saved the
file, the dialog will reflect the new name that you have given the file. You can then
use the disk icon to save the file.

890 Appendix G

You can actually use the disk icon or the menu options interchangeably.
Note

Compiling a Dev-C++ Program

Once you’ve entered and saved your C program, you need to compile it. To compile in
Dev-C++, you select Compile from the Execute menu option. Alternatively you can
select the check mark icon or Ctrl+F9. When you compile the program, a dialog will be
displayed indicating whether there were any errors (see Figure G.10).

FIGUREG.10
Compiling your pro-
gram.

As you can see in Figure G.10, the Total errors box indicates no errors. If this is not zero,
there were errors. These errors will be listed at the bottom of the screen. If you received
any errors when you entered the listing, make sure that you entered the listing exactly as
displayed. Also make sure you didn’t include the line numbers and colons.
If you press Continue, you will be returned to the editor.

50 448201x-APP G 8/13/02 11:22 AM Page 890

Free download pdf