Linux系统解决error: 'fopen_s' was not declared in this scope

 

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

参考:

https://stackoverflow.com/questions/1513209/is-there-a-way-to-use-fopen-s-with-gcc-or-at-least-create-a-define-about-it

 

posted @ 2022-05-09 14:11  努力的小黄鸭  阅读(1242)  评论(0)    收藏  举报