I' m trying to write to a file. It' s created properly but can not write nothing. On debug mode, I can see all attributes of object which I want to write.
My method is so short, I used fseek method before writing.
void File::add(record *ptr){
fseek(book, 0, SEEK_END);
fwrite(ptr, sizeof(record), 1, book);
}
After running the program, I check the file, it' s created empty. The file is the same directory with my source files