Solve the C language program: exe has stopped working, Process returned 255 (0xFF)

When debugging a C language program, the program can run normally, but when the input and output operations are triggered, the program crashes, prompting: exe has stopped working, Process returned 255 (0xFF). As shown in the figure below:
insert image description hereFirst, I checked the code logic, and there was no problem, and there was no warning when compiling the program. I thought that since the program crashed due to input and output, I checked the input and input functions one by one, and found the problem: the parameters in the function should
insert image description here
printf()be It is a string and a parameter list: printf("格式化字符串", 参量表);
Therefore, the quotation marks in the parentheses of the printf() function must be in the form of double quotation marks printf("***"), and when writing code, the eyesight and hands are quick and the single quotation marks are accidentally made printf('***'), which eventually leads to problems.
After correcting the quotes, the problem was solved smoothly. You still have to be patient when writing code, and impatience may lead to small bugs that shouldn't appear.

Guess you like

Origin blog.csdn.net/qq_41320433/article/details/115560444