How do I print in terminal?

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2009
Posts: 5
Reputation: rcaldera43 is an unknown quantity at this point 
Solved Threads: 0
rcaldera43 rcaldera43 is offline Offline
Newbie Poster

How do I print in terminal?

 
0
  #1
Oct 14th, 2009
For some reason, I can't even get a simple "Hello World" to print out in terminal. I'm using Borland C++ Builder 6. The Form1 window comes up but nothing is written in it. No errors, just a blank page.
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 1,859
Reputation: twomers has a spectacular aura about twomers has a spectacular aura about twomers has a spectacular aura about 
Solved Threads: 55
twomers's Avatar
twomers twomers is offline Offline
Posting Virtuoso
 
0
  #2
Oct 14th, 2009
Code?
I blag!?
"Mr Kitty, you have to live in the attic now. Here, write a diary."
I am the Walrus!
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 5
Reputation: rcaldera43 is an unknown quantity at this point 
Solved Threads: 0
rcaldera43 rcaldera43 is offline Offline
Newbie Poster
 
0
  #3
Oct 14th, 2009
Oh yeah, I guess the code would help:

#include <iostream.h> // I/O
using namespace std;
#include <fstream.h> // file I/O
#include <iomanip.h> // format manipulation

int main()
{
cout << "Hello World!\n";
return 0;
}
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 1,859
Reputation: twomers has a spectacular aura about twomers has a spectacular aura about twomers has a spectacular aura about 
Solved Threads: 55
twomers's Avatar
twomers twomers is offline Offline
Posting Virtuoso
 
0
  #4
Oct 14th, 2009
You're probably using an old compiler. Might do good to update it.
Try putting a cin.get() and cin.ignore() before the return 0 in main(). Does the console window disappear, or does nothing turn up?
I blag!?
"Mr Kitty, you have to live in the attic now. Here, write a diary."
I am the Walrus!
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 5
Reputation: rcaldera43 is an unknown quantity at this point 
Solved Threads: 0
rcaldera43 rcaldera43 is offline Offline
Newbie Poster
 
0
  #5
Oct 14th, 2009
I added the cin arguments you mentioned and still nothing. When I say, 'nothing', no error comes up, just the 'Form1' box comes up with nothing in it. I know it must be something basic that I'm missing. I just want to see the output of my basic program just to know the program's working. I'm using Windows7 and Borland C++ with the latest updates. If it would be easier to help me, I've also got Visual Studio 2008 installed too.
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 1,859
Reputation: twomers has a spectacular aura about twomers has a spectacular aura about twomers has a spectacular aura about 
Solved Threads: 55
twomers's Avatar
twomers twomers is offline Offline
Posting Virtuoso
 
0
  #6
Oct 14th, 2009
Originally Posted by rcaldera43 View Post
I added the cin arguments you mentioned and still nothing. When I say, 'nothing', no error comes up, just the 'Form1' box comes up with nothing in it. I know it must be something basic that I'm missing. I just want to see the output of my basic program just to know the program's working. I'm using Windows7 and Borland C++ with the latest updates. If it would be easier to help me, I've also got Visual Studio 2008 installed too.
Try it with VS '08 so. Same code. Though get rid of the .h from the include files.
I blag!?
"Mr Kitty, you have to live in the attic now. Here, write a diary."
I am the Walrus!
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 5
Reputation: rcaldera43 is an unknown quantity at this point 
Solved Threads: 0
rcaldera43 rcaldera43 is offline Offline
Newbie Poster
 
0
  #7
Oct 14th, 2009
Man, this is frustrating. I remember in school, years ago, running this simple of a program was 1,2,3 because Borland and VS were simpler. Once again, even in VS, nothing happens. I just want to see a simple "Hello World" on my computer. What is the most simplest easy way to accomplish this? I feel that my OS and compilers have come too far for me.
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 18
Reputation: ImMoRtAl- is an unknown quantity at this point 
Solved Threads: 1
ImMoRtAl- ImMoRtAl- is offline Offline
Newbie Poster
 
0
  #8
Oct 14th, 2009
try geting this program to compile / make your codes it is really easy http://www.bloodshed.net/dev/devcpp.html
Learn To Code Don't Steal Other's
We Work Hard On Are Programs Don't Steal Them
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 5
Reputation: rcaldera43 is an unknown quantity at this point 
Solved Threads: 0
rcaldera43 rcaldera43 is offline Offline
Newbie Poster
 
0
  #9
Oct 14th, 2009
I finally got it to work. I put a pause near the end so now the terminal stays on. It was disappearing so fast that I never saw it. Thanks for all your help mate!
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 1,859
Reputation: twomers has a spectacular aura about twomers has a spectacular aura about twomers has a spectacular aura about 
Solved Threads: 55
twomers's Avatar
twomers twomers is offline Offline
Posting Virtuoso
 
0
  #10
Oct 15th, 2009
As I said in post #4 :rolleyes:
I blag!?
"Mr Kitty, you have to live in the attic now. Here, write a diary."
I am the Walrus!
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC