home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!charnel!rat!koko.csustan.edu!nic.csu.net!nic.csu.net!nntp
- From: eburk@lisa.sfsu.edu (Eli Burk)
- Newsgroups: comp.lang.c++
- Subject: beginner: how do I use cc++?
- Keywords: cc++
- Message-ID: <1992Nov21.211604.3299@nic.csu.net>
- Date: 22 Nov 92 05:16:03 GMT
- Reply-To: eburk@futonsfsu.edu (Eli Burk)
- Lines: 52
- Nntp-Posting-Host: lisa.sfsu.edu
-
- Hello
-
- ### NOTE
- I wouldn't have posted while just starting to learn a language, but there is
- scant documentation on using c++ on the gnu cc++ compiler on Nexts. Also at
- our computer lab such information is horded like a precious commodity.
-
- *!!! email responces please !!!*
-
- I'm trying to learn C++ (I have experience with C.). I started with the
- simplest of example code. At this point I'm just using examples from my
- books. But I don't know how to make the books examples work.
-
- --- the script file that i was told to use
- #!/bin/sh
- it=$1
- echo "C++ $it"
-
- cc++ $it -I/usr/local/lib/g++-include -g -O -fstrength-reduce
- -felide-constructors -fschedule-insns -fdelayed-branch -fsave-memoized
- -DNO_GNULIB3 -DNO_LIBGXX_MALLOC -pipe -o a.out -L/usr/local/lib -lg++ -lm
-
- --- a c++ file that doesn't work
- #include <stream.h>
- // #include <iomanip.h> // not in the library
-
- main()
- {
- cout << hex;
- cout << 13;
- cout.width(25);
- cout << "testing";
- cout << setw(25);
- cout << "testing";
- }
- --- output
- lisa> !cx
- cx testing02.c
- C++ testing02.c
- testing02.c: In function int main ():
- testing02.c:6: cannot resolve overloaded function `hex' based on non-function
- type
- testing02.c:6: type conversion required for type `ostream'
- testing02.c:8: no member function `ostream::width'
- testing02.c:10: warning: implicit declaration of function `setw'
-
-
- --
- #### Re: NT: clean design (NoT!) (was Re: OS/2 because! (was NT: Why?) ####
- acronym: a word (as radar or snafu) formed from the initial letter or letters
- of each of the successive parts or major parts of a compound term
- Defintion by webster *not* my me eburk@{sutro,springfield,futon,sfsuvax1}
-