When using fopen to open a picture in ppm format, you need to add a header file
#include<stdio.h>
When the following error occurs,
open Properties " Project Properties " C/C++ " Preprocessor Add _CRT_SECURE_NO_WARNINGS
in the preprocessor definition as shown in the figure below. The first parameter of the fopen function is the name of the opened file. The path specified here needs to use double Slash ; the second parameter is the opening method.