Computer Science Canada 'read': identifier not found, short code plz help |
Author: | chopficaro [ Tue Sep 02, 2008 11:22 am ] | ||
Post subject: | 'read': identifier not found, short code plz help | ||
im just trying to get the hang of binary file io by making a simple program that can write a structure into a file, then read it, but the first error message i get is 'read': identifier not found heres the code:
|
Author: | chopficaro [ Tue Sep 02, 2008 11:46 am ] | ||
Post subject: | RE:\'read\': identifier not found, short code plz help | ||
how silly of me, i did not specify the name of the class. i ran into a new problem though, read and write are supposed to take char *, but im not trying to pass a char, im trying to pass a structure pointer, how do i do that? error says cannot convert grades * to char *
|
Author: | OneOffDriveByPoster [ Tue Sep 02, 2008 7:50 pm ] |
Post subject: | Re: RE:\'read\': identifier not found, short code plz help |
chopficaro @ Tue Sep 02, 2008 11:46 am wrote: how silly of me, i did not specify the name of the class. i ran into a new problem though, read and write are supposed to take char *, but im not trying to pass a char, im trying to pass a structure pointer, how do i do that? IIRC, you can cast the grades* to char* in the call to read() and it should work fine. |
Author: | chopficaro [ Wed Sep 03, 2008 5:28 pm ] |
Post subject: | RE:\'read\': identifier not found, short code plz help |
brilliant! TY! works great! |