Has anyone ever had a problem using getch() with dev c++ compiler?
If so how do i fix it?
or is this function only standard with Borland?
Cheers guys
Boontune
Has anyone ever had a problem using getch() with dev c++ compiler?
If so how do i fix it?
or is this function only standard with Borland?
Cheers guys
Boontune
getch() is a non-standard function and its generally present in the headerfile <conio.h> // console input output headerfileOriginally posted by boontune
Has anyone ever had a problem using getch() with dev c++ compiler?
If so how do i fix it?
or is this function only standard with Borland?
Cheers guys
Boontune
why don't you create a dummy variable and use a cin
Code:char dummy; cin >> dummy; // ofcourse it will wait till you press enter key cin.ignore(); // to flush the '\n' (enterkey) if still in the stream
Have a wonderful day.... and keep smiling... you look terrific that way
signing off...
shiv... as i know him
Why no use cin.get() (no params) to wait for the enter key?
-Futura
If you speak or are learning Spanish, check out this Spanish and English Dictionary, it is a handy online resource.
What happens is not as important as how you react to what happens. -Thaddeus Golas
What is the problem you are having?! I didn't have one but I hope I can help you.Originally posted by boontune
Has anyone ever had a problem using getch() with dev c++ compiler?
If so how do i fix it?
or is this function only standard with Borland?
Cheers guys
Boontune
none...
Code:cout << "Press any key to continue...."; char wait = getch(); // or cout << "Press any key to continue...."; cin.get();
I am against the teaching of evolution in schools. I am also against widespread
literacy and the refrigeration of food.
It looks as if getch() isn't in conio.h, but I got this to work with a bit of effort
Dev C++ ver 4.?
Look in the conio.c and conio.h files for seeing what code is finished. It looks like some of the functs aren't et done.Code:#include <iostream> #include "C:\Dev-C++\Include\conio.h" using namespace std; int main(void) { char letter; letter = getche(); return 0; }
I haven't used a compiler in ages, so please be gentle as I try to reacclimate myself. :P
Try including conio_mingw.h instead of conio.h
-Futura
If you speak or are learning Spanish, check out this Spanish and English Dictionary, it is a handy online resource.
What happens is not as important as how you react to what happens. -Thaddeus Golas
Thanks alot for your help guys!
Il give it ago and let you know how i got on.
Cheers
Boontune