#include<iostream>
using namespace std;
int main()
{
cout<<"Welcome to C++";
return 0;
}
But it did not worked.
Thanks for your help.
With regards,
Matanuragi
As Duoas said read the thread: Console Closing Down http://www.cplusplus.com/forum/beginner/1988/
Basically, when you run your program from the IDE, it starts a command line window runs your program then closes said window. You need to use a method that dose not end the program until the use gives some input.
In this case you could achieve this simpley as follows:
1 2 3 4 5 6 7 8
#include<iostream>
usingnamespace std;
int main()
{
cout<<"Welcome to C++";
cin.ignore();
return 0;
}