Re: how to check the scanf function if it will read more than one number
- From: "Moosdau" <moosdau@xxxxxxxxx>
- Date: 2 Jan 2006 20:37:38 -0800
Richard Heathfield wrote:
> For the same reason that pressing the handle on your toilet will not get rid
> of the water waiting in your sink's tap (or faucet, if you're on that side
> of the pond). Flushing is something we do to output, not to input.
thanks.
but what I want to know is the "actual" reason,
not a "logical" one.
e.g.
void f( int*p )
{
if (p->num)
do something;
}
when this function is running, there will be an error.
if I don't know the reason,what I want to know is :
if p is a NULL pointer, p->num will cause the error.
so ,the fflush function works very well on my computer now,
If it cause a potential danger,
I want to know what is it, and what is the condition.
if possible, an example is the best. :)
thanks for all !
.
- Follow-Ups:
- Re: how to check the scanf function if it will read more than one number
- From: Randy Howard
- Re: how to check the scanf function if it will read more than one number
- From: *** T. Winter
- Re: how to check the scanf function if it will read more than one number
- From: Richard Heathfield
- Re: how to check the scanf function if it will read more than one number
- From: Peter Nilsson
- Re: how to check the scanf function if it will read more than one number
- References:
- how to check the scanf function if it will read more than one number
- From: moosdau
- Re: how to check the scanf function if it will read more than one number
- From: Keith Thompson
- Re: how to check the scanf function if it will read more than one number
- From: moosdau
- Re: how to check the scanf function if it will read more than one number
- From: Richard Heathfield
- how to check the scanf function if it will read more than one number
- Prev by Date: Re: This is the end
- Next by Date: Re: how to check the scanf function if it will read more than one number
- Previous by thread: Re: how to check the scanf function if it will read more than one number
- Next by thread: Re: how to check the scanf function if it will read more than one number
- Index(es):