Pergunta

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.

Foi útil?

Solução

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

Outras dicas

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top