I created this function for my program :
int calcTotal()
{
petShop p;
fstream f1;
f1.open("Pet_Shop.dat",ios::app|ios::binary);
int loc;
loc=p.tellp();
float records;
records=loc/sizeof(p);
cout<<"Total number of records = "<<records;
cout<<"Going back to main menu";
menu();
}
I am getting this error :
error C2039: 'tellp' : is not a member of 'petShop'
Isn't the tell() function available in <fstream> libaray?
Anyways, how do I fix it?