home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / gnu / g / help / 1605 < prev    next >
Encoding:
Text File  |  1992-12-17  |  1.0 KB  |  35 lines

  1. Newsgroups: gnu.g++.help
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!usenet.coe.montana.edu!news.u.washington.edu!troy
  3. From: troy@cqs.washington.edu (Troy Frever)
  4. Subject: a very simple question
  5. Message-ID: <troy.724620496@buck>
  6. Sender: news@u.washington.edu (USENET News System)
  7. Organization: University of Washington
  8. Date: Thu, 17 Dec 1992 19:28:16 GMT
  9. Lines: 24
  10.  
  11. I apologize in advance for what is undoubtedly a very simple question
  12. from a novice (myself).  I have a short program which compiles and
  13. executes using CC (on my Sun Sparc2) but which I am unable to compile
  14. using g++.  The program is:
  15.  
  16. #include <iostream.h>
  17. main()
  18. {
  19. int index = 10;
  20.  
  21.    cout << "The hex value of index is " << hex << index << "\n";
  22. }
  23.  
  24. The error message is:
  25.  
  26. g++ -g   -o test test.cc 
  27. test.cc: In function `int  main ()':
  28. test.cc:7: undefined ostream operator << ()
  29.  
  30. Why is it gagging on the "hex" manipulator (it works if I remove it),
  31. and how do I correct it?  Please reply directly to me.  Thanks.
  32.  
  33. Troy Frever
  34. troy@u.washington.edu
  35.