Mail Archives: djgpp/1998/09/25/05:15:51
water <water AT mfi DOT net> wrote:
> ok finaly it works but now when i use the program.
> i have to type
> #include <iostream.h> // necessary for cin and cout commands
> now it will not let me use <iostream.h> it says no file name found
> how do i fix that ?
Name your c++ files .cc (.cpp will also work, IIRC, but it isn't
recommended, read the info-files of gcc) and compile them with
gxx/g++/gpp
For example hello.cc:
#include <iostream.h>
int main() {
cout << "Hallo, this is simple, ain't it" << endl;
return 0;
}
could be compiled with:
gxx -o hello.exe hello.cc
If this doesn;t work, post the output of the compilation (add -v to
the commandline of gxx/g++/gpp for extra information needed to debug
your problem).
This all is also in the FAQ, sections 8.4 and 8.7, always usefull to
read (it's in v2/faq211b.zip on simtel).
hth,
Robert.
--
rjvdboon AT cs DOT vu DOT nl | "En dat is niet waar!" sprak ex-Staatsecretaris-
www.cs.vu.nl/~rjvdboon | van-Onderwijs Netelenbos fel.
- Raw text -