home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / cplus / 16720 < prev    next >
Encoding:
Text File  |  1992-11-21  |  2.0 KB  |  64 lines

  1. Path: sparky!uunet!olivea!charnel!rat!koko.csustan.edu!nic.csu.net!nic.csu.net!nntp
  2. From: eburk@lisa.sfsu.edu (Eli Burk)
  3. Newsgroups: comp.lang.c++
  4. Subject: beginner: how do I use cc++?
  5. Keywords: cc++
  6. Message-ID: <1992Nov21.211604.3299@nic.csu.net>
  7. Date: 22 Nov 92 05:16:03 GMT
  8. Reply-To: eburk@futonsfsu.edu (Eli Burk)
  9. Lines: 52
  10. Nntp-Posting-Host: lisa.sfsu.edu
  11.  
  12. Hello
  13.  
  14. ### NOTE
  15. I wouldn't have posted while just starting to learn a language, but there is
  16. scant documentation on using c++ on the gnu cc++ compiler on Nexts. Also at
  17. our computer lab such information is horded like a precious commodity.
  18.  
  19. *!!! email responces please !!!*
  20.  
  21. I'm trying to learn C++ (I have experience with C.). I started with the
  22. simplest of example code. At this point I'm just using examples from my 
  23. books. But I don't know how to make the books examples work.
  24.  
  25. --- the script file that i was told to use
  26. #!/bin/sh
  27. it=$1
  28. echo "C++ $it"
  29.  
  30.  cc++ $it -I/usr/local/lib/g++-include -g -O -fstrength-reduce   
  31. -felide-constructors -fschedule-insns -fdelayed-branch -fsave-memoized    
  32. -DNO_GNULIB3 -DNO_LIBGXX_MALLOC -pipe -o  a.out -L/usr/local/lib -lg++ -lm
  33.  
  34. --- a c++ file that doesn't work
  35. #include <stream.h>
  36. // #include <iomanip.h>     // not in the library
  37.  
  38. main()
  39. {    
  40.     cout << hex;
  41.     cout << 13;
  42.     cout.width(25);
  43.     cout << "testing";    
  44.     cout << setw(25);
  45.     cout << "testing";    
  46. }
  47. --- output 
  48. lisa> !cx
  49. cx testing02.c
  50. C++ testing02.c
  51. testing02.c: In function int main ():
  52. testing02.c:6: cannot resolve overloaded function `hex' based on non-function  
  53. type
  54. testing02.c:6: type conversion required for type `ostream'
  55. testing02.c:8: no member function `ostream::width'
  56. testing02.c:10: warning: implicit declaration of function `setw'
  57.  
  58.  
  59. --
  60. #### Re: NT: clean design (NoT!) (was Re: OS/2 because! (was NT: Why?) ####
  61. acronym: a word (as radar or snafu) formed from the initial letter or letters 
  62.          of each of the successive parts or major parts of a compound term 
  63. Defintion by webster *not* my me     eburk@{sutro,springfield,futon,sfsuvax1}
  64.