home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / cplus / 18962 < prev    next >
Encoding:
Text File  |  1993-01-11  |  1.1 KB  |  41 lines

  1. Path: sparky!uunet!olivea!spool.mu.edu!caen!hellgate.utah.edu!cc.usu.edu!riverheights!slxmw
  2. From: dayne@cc.usu.edu (869883 Medlyn)
  3. Newsgroups: comp.lang.c++
  4. Subject: C++ ouput problem
  5. Keywords: C++,c++
  6. Message-ID: <1993Jan11.134243.62625@cc.usu.edu>
  7. Date: 11 Jan 93 19:42:41 GMT
  8. Sender: slxmw@riverheights (869883 Medlyn)
  9. Reply-To: dayne@cc.usu.edu (869883 Medlyn)
  10. Organization: Digital Equipment Corporation
  11. Lines: 27
  12. Nntp-Posting-Host: riverheights.declab.usu.edu
  13.  
  14. I have a 10 line C++ program that does not work.  The program is as follows:
  15.  
  16. #include <stdio.h>
  17. #include <stream.h>
  18.  
  19. main()
  20. {
  21. int j;
  22.  
  23. cout << "Enter value j: ";
  24. cin >> j;
  25.  
  26. // problem:: printf statement does not put output on the screen.
  27. printf("%d\n",j);  // or any printf statement
  28. }
  29.  
  30. The output for this program looks like this:
  31.  
  32. localhost> a.out
  33. Enter value: 1
  34. localhost>
  35.  
  36.  
  37. I am running NS 3.0 using the libg++-1.39.0 g++ libraries that I have been able to install.  Anybody have any idea what the problem is or what a fix might be or has anyone even had this problem?  Thanks
  38.  
  39. Dayne Medlyn
  40. dayne@cc.usu.edu
  41.