944,131 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 825
  • C++ RSS
You are currently viewing page 1 of this multi-page discussion thread
Oct 14th, 2009
0

How do I print in terminal?

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rcaldera43 is offline Offline
5 posts
since Oct 2009
Oct 14th, 2009
0
Re: How do I print in terminal?
Code?
Reputation Points: 453
Solved Threads: 57
Posting Virtuoso
twomers is offline Offline
1,873 posts
since May 2007
Oct 14th, 2009
0
Re: How do I print in terminal?
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;
}
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rcaldera43 is offline Offline
5 posts
since Oct 2009
Oct 14th, 2009
0
Re: How do I print in terminal?
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?
Reputation Points: 453
Solved Threads: 57
Posting Virtuoso
twomers is offline Offline
1,873 posts
since May 2007
Oct 14th, 2009
0
Re: How do I print in terminal?
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rcaldera43 is offline Offline
5 posts
since Oct 2009
Oct 14th, 2009
0
Re: How do I print in terminal?
Click to Expand / Collapse  Quote originally posted by rcaldera43 ...
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.
Reputation Points: 453
Solved Threads: 57
Posting Virtuoso
twomers is offline Offline
1,873 posts
since May 2007
Oct 14th, 2009
0
Re: How do I print in terminal?
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rcaldera43 is offline Offline
5 posts
since Oct 2009
Oct 14th, 2009
0
Re: How do I print in terminal?
try geting this program to compile / make your codes it is really easy http://www.bloodshed.net/dev/devcpp.html
Reputation Points: 10
Solved Threads: 1
Newbie Poster
ImMoRtAl- is offline Offline
20 posts
since Sep 2009
Oct 14th, 2009
0
Re: How do I print in terminal?
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!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rcaldera43 is offline Offline
5 posts
since Oct 2009
Oct 15th, 2009
0
Re: How do I print in terminal?
As I said in post #4 :rolleyes:
Reputation Points: 453
Solved Threads: 57
Posting Virtuoso
twomers is offline Offline
1,873 posts
since May 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: hi guyz...
Next Thread in C++ Forum Timeline: screwed here!!!!!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC