fopen => fopen_s
FILE*  fopen ( const char * filename,  const char * mode );.
errno_t  fopen_s( FILE** pFile,  const char *filename,  const char *mode );
 
stream = fopen(FileData.cFileName,"r");                   
if(stream==NULL){
        printf("cannot open file\n");
        exit(
0);
}
------------------------------------------------
if( fopen_s( &stream, FileData.cFileName, "r" ) !=0 )
    printf(
"The file 'crt_fopen_s.c' was not opened\n" );
    exit(0);
}
 
文章標籤
全站熱搜
創作者介紹
創作者 Y CP 的頭像
Y CP

Y CP的部落格

Y CP 發表在 痞客邦 留言(0) 人氣(18)