I started to learn C++ few days ago. When I Run a program it show a console window for a moment then return to IDE. I even couldn't see the output.
for example followig Hello World Program
// a small C++ program
#include <iostream>
using namespace std;
int main()
{
cout << "Hello, world!" << endl;
}
what should I add in this code (infact every code) to stop this problem. I tried to fix it myself by adding cin.ignore(); at the end of the program. But this doesn't workout where program requires the input from user.