Re: Solve system of equation by Gaussian elimination
Originally Posted by kiddo
What is the use of fflush(stdin)?
can you explain for me?
i don't really know about it,
but I often seen it after the end of a loop.....
Originally Posted by shabbir
Flushes the input buffer
It's a bad
practice to use
to flush the input stream.This method is UNPORTABLE
, and hence should be avoided !
It will compile fine, but it's behavior is undefined on many C compilers.
But, it can be used safely with output stream.
To flush input stream, we can define something like :
void my_fflush(FILE *pFile)
while( ((c = fgetc(pFile)) != EOF) && (c != '\n') );
and call it like :