Sams Teach Yourself C in 21 Days

(singke) #1
Getting Started with Dev-C++ 887

G


You should note that the Dev-C++ compiler supports the ANSI standards prior to ANSI
C-99 (ISO/IEC 9899:1999). This means that the most recent ANSI standard is not recog-
nized by this version of Dev-C++. This includes the support of single line comments.
Single line comments will give you an error if the “Support all ANSI C programs” option
is selected. If you want to support single line comments, you should not select this
option. Consult the help files in Dev-C++ to see what other features are not supported.

Entering and Compiling with Dev-C++

You do not need to use projects in Dev-C++ with the listings presented in this book.
Rather, you can enter and compile each listing individually. Listing G.1 presents a small
program that can be entered and compiled as an example.

LISTINGG.1 Sample.c – Sample program
1: // Sample.c
2: #include <stdlib.h>
3:
4: int main( void )
5: {
6: printf(“Dev-C++ Sample Program at work!”);
7:
8: system(“PAUSE”);
9: return 0;
10: }

FIGUREG.6
The C/C++ options
dialog.

Note Don’t enter the line numbers or colons. These are for reference only.


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

Free download pdf