just wanted to start by saying hello and thanks for any help you guys can give me.
Okay im very new to the C++ world but i cant even start at the moment.
1 2 3 4 5 6 7
#include <iostream>
int main( void )
{
using std::cout;
cout << "Hello World!\n";
return 0;
}
i use this code and start it by using ctrl+f5
i get zero error's but then i get a blank cmd screen and the project name as .exe in my process list and i can't stop it and can't close the cmd window either.
Im running windows 7 64bit and using Microsoft Visual C++ 2008 Express Edition
i will try that just adding little info im using this book : C++ Programming for the absolut beginner. this is what they gave me :
Now, gentle reader, let us delve head first into the mystical world of C++. Though you may be
overwhelmed at first with the odd symbols and cryptic terms, it will all become clear in time.
So ready your torch and let us delve into this dark cavern!
1 2 3 4 5 6 7 8
//1.1 – Hello World – Mark Lee
#include <iostream>
int main( void )
{
using std::cout;
cout << "Hello World!\n";
return 0;
}
The above is a complete C++ program. It simply displays the words, “Hello World” to the
screen. Now, let’s take it apart, line-by-line!
okay just used your code same problem no errors but CMD window apears no text nothing and programm just dous nothing. cant stop it using shift+f5 or ctrl-C and also cant stop the process by trying to kill it.
It's a bit hard to explain maybe i should make a film and post it on youtube to show you guys what happens?
[-1 from TheJJJunk for suggesting the use of "system( )"]
apeachaday wrote:
"For one, your using needs to be outside the main, under the #include"
No, they do not. I fact, it's far better than "using namespace ...".
@mythrix: Try running your program from command-prompt. This is how you should be executing your programs, since console programs should not be held open.