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 == ‘
’);
}
rewind(fptr);
return noOfRecs;
}
void closeFile() {
if (fptr) fclose(fptr);
}
/* TODO: read functions go here
bool read(…………….) {
return …..
}
bool read(…………….) {
return …..
}
bool read(…………….) {
return …..
}
*/
}

Posted in Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *