Problems with new "17.4.1.2" headers
Brian Nelson
bnelson@cis.ysu.edu
Fri Feb 21 17:15:00 GMT 2003
>On Fri, Feb 21, 2003 at 10:55:13AM -0500, Brian Nelson wrote:
>> >Brian Nelson writes:
>> >
>> >> I create a generic hello world program, with #include <iostream> and a
cout
>> >> command, and when i compile, I get :
>> >>
>> >> hello.cc: In function `int main()':
>> >> hello.cc:5: `cout' undeclared (first use this function)
>> >
>> >you could try std::cout.
>>
>> There are lots of ways around it, I was just pointing it out as either a bug
or
>> some other problem with a solaris build.
>
>There's nothing to get "around". That's how the language works. The bug
>is in your code.
>
>Since you apparently have a copy of the standard to reference 17.4.1.2,
>I suggest you give 17.4.1.1 a look.
>
>
>Phil
>
Ok. If that's the problem, fine. I didn't quite get that from the Jens-Michael
before. I was told by my user (who codes for a living) that that code should
work. Honestly, I don't know enough to say one way or the other. The 17.4.1.1
would seem to indicate that you are correct.
My original thought still puzzles me though: That code works fine under 2.95.3,
is that version of the compiler therefor 'wrong' in the way it handles this
stuff?
Sorry for being snippy before! I was under the impression that my user knew what
he was talking about.
Thanks!
-Brian
More information about the Gcc-bugs
mailing list