Help with error please.

Posts 1–8 of 8 · Page 1 of 1
Help with error please.
I'm try the "Learn C++ in 21 days" (gotta start somewhere lol) and i'm trying to run this program that it teaches. No errors when i compile it but when i hit run there is a problem. Not sure if i missed something but i followed the the instructions. I'm using Borland Turbo C++.

Here is a link to a pic i saved using the "print screen" button. It shows the error... Thanks...
Send big files the easy way. Files too large for email attachments? No problem!
Next time upload the picture to a image hosting site so we dont have to download it.

I think you may have made the wrong project type. Try creating an empty project and using your code. You may also need to add the line
Code:
using namespace std;
under you're includes.
Thanks for replying. I managed to get a thing come up on the screen that is suppose to contain the text "Hello World" but only the thing popped up but no text. I tried with the code you suggest also...
I recommend you to start learning C before you learn C++
2 problems

One, You should put this code at the VERY TOP of each program so it imports the BASIC windows things
[php]#include <windows.h>[/php]

Also, COUT is only used in CONSOLE applications, and what you have there is a FORM.

A console APP is like Command Prompt, in that you can input/output/prompt the user to get and process info. So, COUT just makes the 'command prompt' basically write something into the field, and nothing more. What you're trying to do is do the same thing in a form, and the compiler is getting confused, since it has nowhere to print the information, since there isn't a console.

Instead of that, write:
[php]ShowMessage("Hello, MPGH!");[/php]

I am also a Borland user, I use Borland C++ 2007 Pro

If you want to make a CONSOLE application just as the tutorial said, go to File>>New>>Other and then select C++ Builder Projects in the tree view on the left, then select CONSOLE APPLICATION.
At the end of the function main(), put

Code:
char c;
cin >> c;
Sorrry it's been a while. Thanks all but i'm still confused. I can't get it to run. I chose console application.
Is it possible you could give me exactly what i need to type so i copy and paste it in and see if that work?. I would appreciate it. I would like to get pass this...
Posts 1–8 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us