Home > Back-end >  To solve the character array
To solve the character array

Time:05-10



This is how to return a responsibility excuse me? How to change?

CodePudding user response:

The scanf (" % s ", m); This sentence, convert: scanf_s (" % s ", m, 20).
Scanf_s () function with the scanf () is the same, but it is better than the scanf () is safe, because scanf_s ()
According to "the scanf () do not check the border, while reading the string may cause memory leaks" this problem,
  • Related