Codeblocks下運行C++的程序時,偶爾會出現 Cannot open output file, permission denied 的問題,導致不能夠編譯。

在 Stack Overflow 上看到有過類似的遭遇。 鏈接地址
I have encountered the same problem you have. I found that it may have some relationship with the way you terminate your run result. When you run your code, whether it has a printout, the debugger will call the console which print a "Press any key to continue...". If you terminate the console by pressing key, it's ok; if you do it by click the close button, the problem comes as you described. When you terminate it in the latter way, you have to wait several minutes before you can rebuild your code.
