🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Troy Frever Thu, 17 Dec 1992 19:28
a very simple question
#629
Author: Troy Frever
Date: Thu, 17 Dec 1992 19:28
24 lines
1078 bytes
I apologize in advance for what is undoubtedly a very simple question
from a novice (myself).  I have a short program which compiles and
executes using CC (on my Sun Sparc2) but which I am unable to compile
using g++.  The program is:

#include <iostream.h>
main()
{
int index = 10;

   cout << "The hex value of index is " << hex << index << "\n";
}

The error message is:

g++ -g   -o test test.cc 
test.cc: In function `int  main ()':
test.cc:7: undefined ostream operator << ()

Why is it gagging on the "hex" manipulator (it works if I remove it),
and how do I correct it?  Please reply directly to me.  Thanks.

Troy Frever
troy@u.washington.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads