chipaug wrote:
> I'm trying to learn C++. I've gotten a copy of "Accelerated C++" and 
> have started to read. I got as far as the first paragraph in chapter 
> 0 before getting stuck. The Hello World program in the book is as 
> follows.
>
> //  a small C++ program
>
> #include <iostream.h>
>   
that is NOT the line in the book
the line in the book says
#include <iostream>
perhaps it would help if you'd use what IN the book instead of what you 
THINK should be in the book.
Further, your compiler is ancient, and was released before the standard 
was approved, it's not even CLOSE to what the standard is.
Replace it
> int main()
> {
>       std::cout << "Hello, World!" << std::endl;
>       return 0;
> }
>
> When I attempt to build this in Visual Studio 6, I get the following 
> errors.
>
> C:\Documents and Settings\Kenneth\My Documents\cpp\1
> \HelloWorld\HelloWorld.cpp(7) : error C2653: 'std' : is not a class 
> or namespace name
> C:\Documents and Settings\Kenneth\My Documents\cpp\1
> \HelloWorld\HelloWorld.cpp(7) : error C2653: 'std' : is not a class 
> or namespace name
>
> If I remove the "std::" from the cout and endl, it appears to build 
> without complaint and runs with the expected output.
>
> Thanks for your help.
> Chip Auger
>
>
>
> To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>. 
> Yahoo! Groups Links
>
>
>
>
>
>
>   

Reply via email to