i use dev-c++.. maybe you can use it as a temporary compiler because it is small and free.
you can get it esaily..now i also want to get a visual studio express.. and i can see what to do by the way. if you use dev-c++, you need to add "system("pause");" at the end of main(), but before "return 0;"
That code should work fine, which leads me to believe that maybe your linker settings are not set properly, or you're not building the program as a console project.
i use dev-c++.. maybe you can use it as a temporary compiler because it is small and free.
you can get it esaily..now i also want to get a visual studio express.. and i can see what to do by the way. if you use dev-c++, you need to add "system("pause");" at the end of main(), but before "return 0;"
ps: welcome to c++, work hard together..
I wouldn't recommend using Dev-C++ anymore as it's no longer being updated. You should use wxDev-C++ instead.
thats why i want to use visual studio express now. and i really want to help Duckwit cuz the poor he is! he got a problem when he just stepped in c++, hey c++ go easy on us.
or you're not building the program as a console project.
It was not a console Application. :l Being a noob to the subject I just didn't know.... I figured the first type of C++ thing you could create was the normal one, so I clicked "Class Library". I feel....like a newbie.
Am I supposed to use CLR Console Application or Windows Forms Application?
I think the syntax for Visual C++ is different to the one taught here... this is what is there when you start a new program;
#include "stdafx.h"
using namespace System;
int main(array<System::String ^> ^args)
{
Console::WriteLine(L"Hello World");
return 0;
}
dude your in the wrong path.. CLR means common language runtime.. that mean it's C++/CLI, that mean it runs on .NET frameworks. that's different from C++
for your code to work choose
1. new project
2. choose win32
3. win32 console application
4. click next then check "empty project"
5. click finish..
Thanks! That is a video from 2008 though. It shows the "Hello World" working. Though when I insert the _exact_ code it opens then closes instantly. What is the code line for that not to happen? [Other than system("pause");]