CS计算机代考程序代写 #define _CRT_SECURE_NO_WARNINGS

#define _CRT_SECURE_NO_WARNINGS
#include
#include “File.h”

namespace sdds {
FILE* fptr;
bool openFile(const char filename[]) {
fptr = fopen(filename, “r”);
return fptr != NULL;
}
int noOfRecords() {
int noOfRecs = 0;
char ch;
while (fscanf(fptr, “%c”, &ch) == 1) {
noOfRecs += (ch == ‘\n’);
}
rewind(fptr);
return noOfRecs;
}
void closeFile() {
if (fptr) fclose(fptr);
}
/* TODO: read functions go here
bool read(…………….) {
return …..
}
bool read(…………….) {
return …..
}
bool read(…………….) {
return …..
}
*/
}