|
From: Oscar F. <of...@wa...> - 2003-04-26 14:58:29
|
"Andrew Marcus" <and...@ho...> writes: > I am still having problem with the header file. I just installed > MinGW-2.0.0-3.exe. The command I use to compile the program is: > > gcc hello.c iostream is a C++ header. Save your source file with .cpp extension and use g++ instead of gcc for compiling. > The error message I get is > > C:\model\amptobod>gcc hello.c > hello.c:1:20: iostream: No such file or directory Obviously, if you compile a C source file, system C++ header directories are not taken on account. > hello.c: In function `main': > hello.c:4: parse error before ':' token > hello.c:5:3: warning: no newline at end of file The C++ standard requires that every file shall end with a newline. Add one and the warning will go away. [snip] -- Oscar |