Home > Back-end > The problem of input bosses ask cycle
The problem of input bosses ask cycle
Time:10-11
Such as ruby roth want to do a simple ATM program, but the scanf can only enter two, three and will not be able to enter after the first how to solve?
CodePudding user response:
Add \ n
CodePudding user response:
Scanf_s have asked about parameters, scanf_s still have difference with the scanf,
Is updated version, after all, compared with scanf_s security, because scanf_s () is aimed at "the scanf () do not check the border, while reading the string may cause memory leakage
Lou ", scanf_s () is used to read the string, you must provide a number to indicate how many characters, most read in order to prevent overflow,