Code::Blocks Forums
User forums => Help => Topic started by: Player_01 on March 26, 2016, 04:10:01 pm
-
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;
}
-
http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)