I use codeblocks IDE and gcc compiler. I tried to write the simple program billing system.We I use the getch(); for character input there will be no error during building the project but at run time there will be error and shows the error message like this "Drawing operation was attempted when there was no current window." What was the actual problem.

有帮助吗?

解决方案

since you are using in windows with Code::Blocks with gcc I'm safely assumeing you are using cygwin toolchain, which is a linux like environment. So I recomend you to use system("pause") including the header stdlib.h

其他提示

You have not mentioned in what platform you are compiling. If it's Linux you can not use getch() since conio.h is only for dos. But with this error message is most probably caused by incorrect integration of gcc with Code::Blocks. Try compling with gcc directly.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top