Hey guys I am trying to use code:blocks on Ubuntu and when I use _getch(); to stop the console from closing I get not defined error. Usually in Visual C++ 2010 i use
#include <conio.h>
and I never have issues that way. What am I missing?
This function is named differently by different compilers. It may be _getch() or without leading underlaying symbol getch(). And even it may be declared in some other header because thsi function is not standard.
So you can try to use getch() or you can open <conio.h> and look through it is where such a function or not.
Why would you even need such a function? (it's part of ncurses, by the way) Code::Blocks keeps the terminal open and outside of an IDE console programs are run from a terminal anyway.