visual studio code terminal keeps closing c++
//add system("pause"); before return 0; in main()
#include <iostream>
int main()
{
std::cout << "Hello world!" << endl; //system("pause") dont make new line so you will need the endl
system("pause");
return 0;
}