When I use the if (num1 == 1) {} syntax, it does not carry out the comand when I click on the .exe.
The console window just flashes and dissapears. Running form Code::Blocks does not have this error.
When you run from C::B it keeps the console open when the program ends (if configured to do so). When you double click in the exe the console closes as soon as the program terminates. You must open a console (cmd) and run the program in it.
This is not a bug with if(), and even if it were a bug it would be a compiler one. Elementary.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When you run from C::B it keeps the console open when the program ends (if configured to do so). When you double click in the exe the console closes as soon as the program terminates. You must open a console (cmd) and run the program in it.
This is not a bug with if(), and even if it were a bug it would be a compiler one. Elementary.
Thanks!