This line of code is incorrect as it should have an ampersand (&) before the variable 'c' in the scanf_s function to indicate the address of the variable where the input value will be stored. The corrected line of code should be:

char c; scanf_s('%c', &c, sizeof(c));

C Programming: Correcting scanf_s() Usage for Character Input

原文地址: https://www.cveoy.top/t/topic/mMeI 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录