Linux 编译报错 error: ‘fopen_s‘ was not declared in this scope

不同操作系统对于函数的定义、名称以及参数有所不同,需要在文件前加入代码:

#ifdef __unix
#define fopen_s(pFile,filename,mode) ((*(pFile))=fopen((filename),  (mode)))==NULL
#endif

猜你喜欢

转载自blog.csdn.net/daijingxin/article/details/110777856