hi,

struct bike
{
char manuf[25];
int id;
bool rcode;
char customer[25];
int size;
float rentcoast;
bike *manufP;
bike *idP;
};
int main( )
{
bike *temp;
int code;
char ch[20];
ifstream filestr;
filestr.open("lib/lab1.dat");
......
......
}

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?

thanks.