Reputation: 29
I have this main: (part of the code).
int main ()
{
Person* pPerson;
ifstream file ("data.dat", ios::binary);
pPerson = personFactory::getPersonFromFile(file);
...
}
Can I define the calls that...? (part of the class).
class personFactory{
public:
...
Person* getPersonFromFile (ifstream& inFile);
...
};
Upvotes: 0
Views: 66
Reputation: 13979
I think if your call looks like
personFactory::getPersonFromFile(file)
you need to have it static
static Person* getPersonFromFile (ifstream& inFile);
Upvotes: 1