Re: help
- From: Flash Gordon <spam@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 09 May 2007 19:49:10 +0100
osmium wrote, On 09/05/07 16:23:
"Richard Bos" writes:
"osmium" <r124c4u102@xxxxxxxxxxx> wrote:
"i" writes:You can, but you shouldn't. If you do this on a multi-user system, you
I want to display two answers .When i press the Enter key firstYou can create short delays by using the clock() function, see <time.h>.
answer should be displayed and few seconds later the second answer
should be displayed. How can i do it?
risk getting banned by the sysadmin for hogging the CPU. A much better
solution is to use a system-specific function for this more or less
system-specific problem; ask in a newsgroup that deals with the OS
and/or compiler you're using, and see also (as usual!) the FAQ:
<http://c-faq.com/osdep/subsecond.html>.
The code posted by the OP suggested, to me, a beginning coder - very likely a student.
There are two possible answers that survive the very vigilant net nannies on this NG.
o A C way
o You can't do that in standard C.
I thought the first approach was more helpful, considering who was asking the question.
I would be mildly surprised if the instructor did not expect the OP to use a delay/sleep/wait type function provided by the implementation rather than a loop, so I would consider Richard's suggestion to be more helpful. It is especially helpful as if the instructor is good the OP might even get some bonus points for saying that it is a system specific solution.
> You approach would not only be more difficult for the OP to
use but it violates the net nannies threshold for NG abuse.
Saying you should (or can only) do something using a system specific method and saying where to go to find the solution does not as far as I've seen upset even the strictest interpreters of this groups purpose. It is when the discussion is not redirected to an appropriate place that the complaints start.
--
Flash Gordon
.
- Prev by Date: Re: structure and malloc
- Next by Date: Re: Huge memory allocation
- Previous by thread: Re: help
- Next by thread: Re: help
- Index(es):
Relevant Pages
|
|