home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / msdos / programm / 8090 < prev    next >
Encoding:
Text File  |  1992-07-25  |  1.0 KB  |  37 lines

  1. Path: sparky!uunet!ogicse!usenet.coe.montana.edu!Msu.oscs.montana.edu!imsks126
  2. From: imsks126@Msu.oscs.montana.edu
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: #include <iostream.h> cout "Hello World\n" hassle (kindergarten prob, I guess)
  5. Message-ID: <0095E0C9.C1EA64E0@Msu.oscs.montana.edu>
  6. Date: 24 Jul 92 18:07:47 GMT
  7. Article-I.D.: Msu.0095E0C9.C1EA64E0
  8. Sender: usenet@coe.montana.edu (USENET News System)
  9. Reply-To: imsks126@Msu.oscs.montana.edu
  10. Organization: Montana State University
  11. Lines: 24
  12.  
  13.  
  14. What am I doing wrong? If I #include <iostream.h> I can
  15.  
  16. void main(void){
  17.   int a = 123;
  18.   cout << a;
  19.   }                
  20.  
  21. and 123 gets printed to the screen.
  22.  
  23. but if I try:                      or:  
  24.  
  25. void main(void){                   void main(void){
  26.   char str[6];
  27.                                      cout << "Uga Buga";
  28.   str = "Uga Buga";                  }
  29.   cout << str;
  30.   }
  31.  
  32. in both cases I get linker error "undef symbol in ostream:: etc."
  33. This must be something very stupid and elementary, but I can't 
  34. get it working. Thanks.
  35.  
  36. Sandy
  37.