When I execute a simple program in c++ the console flashes and closes?

SJ AnthonyUSN

New member
Im trying to get back in to c++, everytime I try to execute the file in VS the console just flashes and dosent stay up, what am I doing wrong?...I know i could make it stay up if if I wrote cin>>, is there away around that?... heres the code, its pretty simple...

#include <iostream>


int main()
{
std::cout << "Welcome ";
std::cout <<"to c++\n";
return 0;
}
 
Back
Top