0

I am writing a function in C for class and we were given this as a starter to the assignment. I have literally copied and pasted however I am gettin and error that reads "Implicit declaration of function 'fopen_s' is invalid in C99" and "Use of undeclared identifier 'fp'"

#include <stdio.h>

int compare(void);

int main(void) {
int i;

fopen_s(&fp, "largeSmallLab.txt", "w");

for (i = 1; i <= 4; ++i) {
    compare();
}

fclose(fp);
return 0;

}

0 Answers0