I'm using VScode on Windows to program in C++.
The printf
command works, but the cout
command doesn't work. The compiler doesn't show me an error, either. I've already installed all of the necessary extensions in addition to MSYS2.
This is the code where I use the printf
command that works correctly:
#include
#include
int main()
{
printf("hola \n");
system("pause");
return 0;
}
And this is the code where I use cout
, where it does not show me the message "Hello"
, but instead shows me the following:
The terminal process [path\to\executable] terminated with exit code: -1073741515.
#include
#include
#include
using namespace std;
int main()
{
cout<<"hola \n";
system("pause");
return 0;
}
I tried reinstalling VSCode, along with the extensions, in addition to msys2.