warning C4996: 'fopen' vs 'fopen_s'

Joined
Jul 8, 2008
Messages
1
Reaction score
0
Hi all,

since my lecturer told us to set the level of compilation to treat warnings as errors, i keep getting this warning:

warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead

i'm using Visual Studio 2008 Pro.

this is the code:
out is FILE*

if ((strcmp(argv,"-o"))==0){
o_exist=TRUE;
out=fopen(argv[i+1],"w");
if (out==NULL){
mtm_error(err_OpenFailed);
return 1;
}
i+=2;
continue;
}

Does anybody know what the problem is?
We didn't learn fopen_s and we've been told to use only what was taught in class...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top