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