I have recently installed Code Blocks and I'm using it for C++ programming.
I have written a basic Hello World program and when i run the program, 2 console windows are opening instead of 1. If there's only output then the 1st console closes after showing the output and then the 2nd window stays open. My main problem is when I'm trying to take in some input and execute some more stuff. The 1st window works as it should, going to the end of the prog, closes and then the 2nd window again starts from the beginning.
I'm not able to close the 1st window and it's kinda irritating running through the program twice. I tried searching on the net, but no one seems to have faced this issue before.
Any advice is really appriciated.
If you're running Avast, go to :
Should run fine now.
This problem can be caused by an antivirus application like aVast that executes unknown applications for a short time in a sandbox to determine if the program appears to be a virus. Disabling this feature altogether or excluding your binary folder for project are good way around this issue. For my projects I exclude the entire programming folder where all of my c++ projects and build trees are stored.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With