004 vs中使用vc的函数
发布时间:2020-12-16 09:17:06 所属栏目:百科 来源:网络整理
导读:? ? #define _CRT_SECURE_NO_WARNINGS #include " stdafx.h " int main(){ FILE *pFile = fopen( " c:test.txt " , " w " ); putc( ‘ x ‘ ,pFile); fclose(pFile); return 0 ;} ? // vc : 打开文件函数 - fopen FILE * fopen( const char * filename, co
? ? #define _CRT_SECURE_NO_WARNINGS #include "stdafx.h" int main() { FILE *pFile = fopen("c:test.txt","w"); putc(‘x‘,pFile); fclose(pFile); return 0; } ? // vc : 打开文件函数 - fopen FILE *fopen( const char *filename,const char *mode ); // vs : 打开文件函数 - fopen_s errno_t fopen_s( FILE** pFile,const char *filename,const char *mode ); // 解决方法 - 添加预处理 #define _CRT_SECURE_NO_WARNINGS (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |