visual studio code terminal keeps closing c 2b 2b

Solutions on MaxInterview for visual studio code terminal keeps closing c 2b 2b by the best coders in the world

showing results for - "visual studio code terminal keeps closing c 2b 2b"
Philipp
10 Sep 2019
1//add system("pause"); before return 0; in main()
2#include <iostream>
3int main()
4{
5  	std::cout << "Hello world!" << endl; //system("pause") dont make new line so you will need the endl
6	system("pause");
7  	return 0;
8}