As shown in the figure below, when printing through printf, if there is Chinese, it will print out garbled characters
Solution:
Just add the following statement to the main function, and the corresponding header file is
#include <windows.h>
system("chcp 65001");
After modification, as shown in the figure below: