home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!news
- From: phil@cs.utexas.edu (Philip Smolen)
- Newsgroups: comp.os.msdos.programmer
- Subject: Re: #include <iostream.h> cout "Hello World\n" hassle (kindergarten prob, I guess)
- Date: 26 Jul 1992 23:30:07 -0500
- Organization: U Texas Dept of Computer Sciences, Austin TX
- Lines: 21
- Message-ID: <l76uufINN816@muleshoe.cs.utexas.edu>
- References: <0095E0C9.C1EA64E0@Msu.oscs.montana.edu>
- NNTP-Posting-Host: muleshoe.cs.utexas.edu
-
- In article <0095E0C9.C1EA64E0@Msu.oscs.montana.edu> imsks126@Msu.oscs.montana.edu writes:
-
- >What am I doing wrong? If I #include <iostream.h> I can
- [working program deleted]
- >void main(void){ void main(void){
- > char str[6];
- > cout << "Uga Buga";
- > str = "Uga Buga"; }
- > cout << str;
- > }
- >
- >in both cases I get linker error "undef symbol in ostream:: etc."
-
- Strange. I compiled the last two programs just now and got exactly what I
- expected. The one on the left wouldn't even compile. (An array name is
- a constant pointer, and thus not an lvalue.) The one on the right printed
- the message on the screen. I am using CC on a SUN/SPARC.
-
- Perhaps the problem is in your compiler or the way you set it up.
-
- --Phil
-