struct,pointer and file
int main( )
I want to write a function that will allocate storage for a new bike struct (a new node), read the data for the bike data members from a file named lib/lab1.dat, and return a pointer to the new node.
how can I write this function?
You can allocate memory with the 'new' keyword and the read the file with filestr.get()/filestr.getline() etc.