I'm new to C++ having just finished a C course and I just read the FAQ to try and get my progs to show the window by typing:
this shows the window but when I press the enter key it just moves the cursor in the window and doesn't exit the program.Can anybody help me correct this trivial problem?????
You may want to add a little more of your source code. The problem is not likely to be localized to just the code in the main function alone.
If you're after portability use -
Alternatively some compilers include non-standard functions in conio.h to obtain un-echoed input.
cin.get() did it. By the way I'm using DevC++ compiler.Has anyone had any problems with it?
cin will wait for a character. it doesn't care about whitespaces like space or return.
>By the way I'm using DevC++ compiler.Has anyone had any problems with it?
No, but strictly speaking Mingw is the compiler, Dev C++ is the IDE.
>cin will wait for a character. it doesn't care about whitespaces like space or return.
Correct if you are talking about operator >>, cin doesn't do anything unless you call one of its member functions.
i can't seem to get delay to work with dev 4c++ so i got borland c++ it's only 5.01 but i prefer dev c++4 it looks better just the delay(); function doesn't work.
>just the delay(); function doesn't work.
That's because there is no delay() function in standard C++, it must be a borland extension.