Can someone please help me, oh and btw im using windows 7 64-bit
Well according to what it says its one of two things:
-Either the program is not correctly installed
-You made a different type of project. It should be "Console Application"
Posts 1–15 of 23 · Page 1 of 2
Post a Reply
Tags for this Thread
None
Tryed everything can someone please help please it gfetting annoying
Originally Posted by zack69
Tryed everything can someone please help please it gfetting annoying
Ok man so create a new project and make it a console application. Choose empty project. Now put your code into the coding window, and then Compile & Run.
Originally Posted by -TwEaK
Ok man so create a new project and make it a console application. Choose empty project. Now put your code into the coding window, and then Compile & Run.
Is that hello world program actually right? Because I used this style:
Code:
#include "stdafx.h"
#include <iostream>
int main()
{
using namespace std;
cout << "Hello World!" << endl;
return 0;
}
That compiled well and ran well too.
Originally Posted by Unicow
Is that hello world program actually right? Because I used this style:
Code:
#include "stdafx.h"
#include <iostream>
int main()
{
using namespace std;
cout << "Hello World!" << endl;
return 0;
}
That compiled well and ran well too.
using namespace std is in your main?
and you dont need to daum include stdafx for a project that small, nobody uses it.
He's running it in Debug mode, run it without debugging.
Originally Posted by Virtual Void
using namespace std is in your main?
and you dont need to daum include stdafx for a project that small, nobody uses it.
He's running it in Debug mode, run it without debugging.
Lol,,,He said that run well too !
Originally Posted by Hassan
Lol,,,He said that run well too !
I could have a couple useless abstract base classes and some wild pointers and it would run fine too. stdafx is unneeded and using namespaces are neater when put before main, after includes and crap
Originally Posted by Virtual Void
I could have a couple useless abstract base classes and some wild pointers and it would run fine too. stdafx is unneeded and using namespaces are neater when put before main, after includes and crap
would using namespace even work with other functions if its inside main..?
Originally Posted by mookamoka3
would using namespace even work with other functions if its inside main..?
Declare it before anything that uses it. Its best to just put it after your includes.
Originally Posted by Virtual Void
Declare it before anything that uses it. Its best to just put it after your includes.
Yeeeep thats what i do.
@Unicow his style is basically the same as yours, except instead of using endl to create a new line he just used '\n'. It does the same thing in the end, but it's more common to just use endl.
Originally Posted by mookamoka3
Yeeeep thats what i do.
@Unicow his style is basically the same as yours, except instead of using endl to create a new line he just used '\n'. It does the same thing in the end, but it's more common to just use endl.
I see, Thanks. Didn't know that, I just found mine on Learncpp.com :P.
thanks i dont get errors anymore but when i run a small black windows pops up for 1 sec and then goes away, oh and btw u did "Win32 Console application"
Originally Posted by zack69
thanks i dont get errors anymore but when i run a small black windows pops up for 1 sec and then goes away, oh and btw u did "Win32 Console application"
thats because console applications are ment to be run from cmd(start>run>cmd)
You can add a cin.get(); right before the last return in main(), then i'll stop there untill you press enter