New to GCC

Uttam Pawar uttamp@us.ibm.com
Thu Aug 19 20:59:00 GMT 2004


add "using namespace std;" line after the #include.

- uttam

On Sat, 2004-08-14 at 01:15, jlopes151@comcast.net wrote:
> Ok after a number of coding years I've gotten around to GCC. I'm compiling a cpp file and find
> I can't use "cout" nor "endl".
> 
> compile command line:
> 
> gcc -c Widgets.cpp 
> 
> were a method is to display the name of the widget, 
> 
> void Widget::displayName(){
>          cout << "Name of widget " << widgetName << endl;
> }
> 
> I include the iostream header 
> 
> the error message claims "cout" is undeclared. 
> 
> thanks for the help
> 



More information about the Gcc mailing list