Home > Back-end >  Why the scanf is skipped?
Why the scanf is skipped?

Time:09-28



Could you tell me why I line 77 the scanf () is cleared, I have already cleared the cache area but still did not perform, seek help from bosses!!!!!

CodePudding user response:

Where empty input buffer? See only the empty output caching,

CodePudding user response:

First the scanf, a carriage return after you input data, the carriage return is 77 lines of the scanf reads,

CodePudding user response:

Thanks, solved the, originally with the fflush (stdin) clearly in addition to the input buffer but not yet, later discovered, check the GCC does not support, adopt the method of the other clear input cache!

CodePudding user response:

reference 3 floor corner black cat replies:
thanks, solved, originally with the fflush (stdin) in addition to the input buffer but not yet, later discovered, check the GCC does not support, adopt the method of the other clear input cache!


The fflush (stdou); Is feasible, the fflush (stdin); Some compilers are undefined, i.e., not sure good with,
  • Related