Re: just starting
- From: "Alf P. Steinbach" <alfps@xxxxxxxx>
- Date: Wed, 31 Jan 2007 06:41:18 +0100
* Jim Langston:
<sterling.mckay@xxxxxxxxx> wrote in message news:1169958279.800511.264380@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[snipped]
Basically it sounds like you want to wait for a key to be pressed before the DOS window closes. In C I would write:
while ( !kbhit() )
in C++ I would write:
std::cin.getch();
although the C++ method requires a carraige return.
'kbhit' is not a standard C function.
If it is available with your C compiler, it should also be available with your C++ compiler from the same vendor.
There is no difference between C and C++ in this respect except that /more/ (e.g. 'std::cin') is available in the C++ standard library.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
.
- References:
- just starting
- From: sterling . mckay
- Re: just starting
- From: Jim Langston
- just starting
- Prev by Date: Re: help with automatic code generation
- Next by Date: Re: Other than php/perl/lisp/c/c++/java, anybody have a favorite computer-programming language?
- Previous by thread: Re: just starting
- Next by thread: hey help in solving the following recurrence...
- Index(es):
Relevant Pages
|