are there any or am i really limited to using cin?
are there any or am i really limited to using cin?
or cin.get();Code:#include <stdlib.h> ... ......... system("pause"); ....
do a search
Instead of finding a function that works with your compiler you should get a compiler that works with all the functions you want to use. You would be supprised how many functions will not work with DevC++. There are many compilers that will work with a nice development environment. Now matter which free compiler you choose cEdit ( http://cedit.sourceforge.net ) will work well and I think it is actually nicer than DevC++'s environment. My prefered free compiler is Borland ( http://www.borland.com ). There is always the more expensive but versitile Visual Studio by Microsoft.
Last edited by Squiggle; 04-24-2003 at 02:20 PM.
i dont need it for a system pause
i need it to actually wait for a specific keyboard input before proceeding, and without using enter
getch doesn't exist with DevC++, but getche does:
Code:#include <iostream> #include <conio.h> using namespace std; int main() { cout<<"Hit a key: "; int key = getche(); cout<<"\nYou hit "<< static_cast<char>(key) <<endl; cin.get(); }
p.s. What the alphabet would look like without q and r.
Theres been tons of topics on these boards about incorporating getch() into dev, just run a search theres lots of information.