I wrote a CPP program on Code :: Blocks and compiled it (MinGW). This is a simple application, but it shows a big problem that I still can not 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 a result: Console
Nothing happens...
If I execute it from code blocks, it just opens and disappears. But in two cases this is inconvenient, I can not kill this process. But when I try to restart the computer, I get an error message, it says that the program was incorrectly initialized. I donβt know how to debug programs, and I have no idea how to proceed. could you help me?
Sorry for any language errors, I am not an English master (yet). Thanks.
Edit:
#include <iostream> int main(int argc, char *argv[]) { std::cout << "Something here" << std::flush; return 0; }
It still does not work. Even with '\n' or std::endl .
source share