-
Notifications
You must be signed in to change notification settings - Fork 505
Open
Description
Tried this lesson, but got error. Have retyped it from book, but same thing happens! Could somebody help me with it?:zipper_mouth_face: Im on Windows.
app.exe db.dat c
Creates file db.dat 101kb size
app.exe db.dat s 1 zed [email protected]
Fires
ERROR: Failed to load database.
Debugger said it happends at fread(), it returns 0 somehow
int rc = fread(conn->db, sizeof(struct Database), 1, conn->file);
void Database_load(struct Connection* conn)
{
int rc = fread(conn->db, sizeof(struct Database), 1, conn->file);
if (rc != 1)
die("Failed to load database.");
}
Metadata
Metadata
Assignees
Labels
No labels