While testing programs of C++ using the MinGW compiler I always get the same error "program.exe has stopped working" after it displays one line of text.
For the program below the only line that's printed is "char letter: A" followed by the error window. Why is this happening?
#include <iostream>
using namespace std;
int main()
{
char letter = 'A';
int number = 100;
float decimal = 7.5;
double pi = 3.14;
bool isTrue = false;
cout << "char letter: " << letter << endl;
cout << "int number: " << number << endl;
cout << "float decimal: " << decimal << endl;
cout << "double pi: " << pi << endl;
cout << "bool isTrue: " << isTrue << endl;
return 0;
}