well im am trying to load a class, it does compile,but doesnt work
here's my code:
Code:
//prototype
void loadS(Student(*)[10]);
class Student
{
... //some stuff, also void display()
}
// in "int main()"
Student student[10];
loadS(student&); // loading it
void loadS(Student* loading[])
{
ifstream load;
load.open("Data.dat",ios::out | ios::binary);
// theres some data in Data.dat
load.read((char*)&loading, sizeof(Student));
load.close();
loading[0]->display(); //just a display test
loading[1]->display();
return;
}
//info in data.dat should be in "student" now
It is supposed to load the class with 10 objects, wich is in data.dat, in (Student)student.
this is the error:
Make.obj : error LNK2001: unresolved external symbol "void __cdecl load(class Student (*)[10])" (?loadS@@YAXPAY09VStudent@@@Z)