_getch not defined Code:Blocks

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?

Thanks
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.
Ok thank you very much for your help
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.
Oh i didnt know that. I have been using Visual C++ and I always have to either put _getch(); or system("pause");

I just started using code::blocks...

Good to know thanks
Topic archived. No new replies allowed.