Home > Back-end >  The scanf return values are ignored
The scanf return values are ignored

Time:11-03

Computer small white, had just begun to learn c, by bosses, guidance of vs2019

CodePudding user response:

Solution: 1) to replace the scanf for scanf_s
2) in the front plus # pragma warning (4996) disable:

CodePudding user response:

To explain why such operation is ok? 1), 2)

CodePudding user response:

refer to the second floor ice rose fragile reply:
to explain why such operation is ok? 1), 2)
the scanf unsafe bai, so v got a scanf_s come out, but apparently this code can only be compiled on vs

CodePudding user response:

That is warned, the scanf is a return value, but you didn't use, so the IDE prompts you ignored the scanf return values problem, I think if you really don't have to he return values can need not tube

CodePudding user response:

Add two getchar ();
  • Related