can't include iostream.h
Brian D. McGrew
brian@visionpro.com
Thu Apr 13 21:41:00 GMT 2006
Iostream is a C++ header, not a C header and in all the newer version of
GCC, it's just iostream, not iostream.h. Try this
#include <iostream>
int
main(int argc, char *argv)
{
std::cout << "Hello World" << std::endl;
return(0);
}
g++ test.c -o test
./test
:b!
Brian D. McGrew { brian@visionpro.com || brian@doubledimension.com }
--
> Those of you who think you know it all,
really annoy those of us who do!
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Perry Smith
Sent: Thursday, April 13, 2006 2:30 PM
To: MaaSTaaR
Cc: gcc-help@gcc.gnu.org
Subject: Re: can't include iostream.h
The compiler will create an executable. Are you running the
executable? By default, I believe, it is called a.out Or you can
give it a name like:
gcc -o foo foo.c
where foo.c is your source file name and foo is the name of the
executable.
Then execute foo with:
./foo
HTH
Perry
On Apr 13, 2006, at 11:56 AM, MaaSTaaR wrote:
>
> Hello ...
>
> i tried it but the same problem don't print anything
> --
> View this message in context: http://www.nabble.com/can%27t-include-
> iostream.h-t1445505.html#a3904462
> Sent from the gcc - Help forum at Nabble.com.
>
>
More information about the Gcc-help
mailing list