reading file to struct
a guest May 6th, 2010 133 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- fread((void *)buffer, sizeof(OBJECT), 1, file);
- OBJECT* obj;
- obj = (OBJECT*) malloc(sizeof(OBJECT));
- obj = (OBJECT*) buffer;
- obj->c[obj->a] = '\0';
- printf("obj->a = %d\n"
- "obj->f = %d \n"
- "obj->c = %s\n",
RAW Paste Data