when i compiling program that have some safer function like strcat_s, fopen_s, ...
it give me a error on output, but after building the program work fine
it is my source :
#include <stdio.h>
#include <string.h>
int main()
{
FILE *fp;
char str1[20] = "h:\\", str2[] = "test.txt";
strcat_s(str1, sizeof(str1), str2);
printf("%s\n", str1);
fopen_s(&fp, str1, "uw");
if ( fp )
{
fputs("this is just for test", fp);
fclose(fp);
}
return 0;
}
and it is output log when i juct compile :
Building test.obj.
H:\Programming\C\test\test.c(9): warning #2027: Missing prototype for 'strcat_s'.
H:\Programming\C\test\test.c(12): warning #2027: Missing prototype for 'fopen_s'.
Done.
I use PelleC version 5.00.1
tnx