I wrote a CPP program on Code::Blocks and compiled it (MinGW). It is a simple application but shows a big problem that I still can't solve.
#include <iostream>
int main(int argc, char *argv[])
{
std::cout << "Something here";
return 0;
}
When I try to run this program (on code blocks [F9 - compile and run]) I get this as result: Console
Nothing happens...
If I execute it out from codeblocks, it just opens and disapears. But on the two cases, it is unkillable, I cant kill this proccess. But when I try to restart the computer, I get an error, it says that the program wasn't correctly initialized. I don't know how to debug programs, and I have no idea of how to proceed. Could you help me?
Sorry for any language mistakes, I'm not an english master (yet). Thank you.
Edit:
#include <iostream>
int main(int argc, char *argv[])
{
std::cout << "Something here" << std::flush;
return 0;
}
It stills not working. Even with '\n'
or std::endl
.