You have specified the mode argument as "r", indicating that you want to read the file, so you can’t write to thisfile. The file position will be set to the beginning of the data in the file. Clearly, if you’re going to read the file, it mustalready exist. If you inadvertently try to open a file for reading that doesn’t exist, fopen_s() will set the file pointer toNULL and return a nonzero value. You should always check the value returned from fopen_s() to make sure you reallyare accessing the file you want.
đang được dịch, vui lòng đợi..