dear all, wat should i do to clear the input buffer stream?
and also make me clear regarding flush and fflush. both do the same functions?

Neither flush() nor fflush() are used on input streams. Read this for how to flush input streams.

>>both do the same functions
Yes -- flush() is used by c++ streams in <fstream> and fflush() is used by C streams declared in <stdio.h>. Both flush the output stream.

i would also like to know how to implement it...

than you guys..