Code:
dataFile.write(reinterpret_cast<char *>(&ac), sizeof(ac));
This will only work if all the data is stored as part of the class (eg int, float etc). Where a dynamic type is used (eg string) this doesn't work as the data is stored in memory outside of the class. The class only holds a pointer to the data.

Code:
Account ac;
dataFile.seekg(0,ios::end);
int size = dataFile.tellg();
int totAc = size/sizeof(ac);
dataFile.seekg(0,ios::beg);
This code won't do what is expected if Account is written to the file properly because the size of name etc (a string) is variable - so the size of the data written for each Account record could be different.

Code:
bDataFile << ac;
For stream insertion/extraction for a user defined struct/class you need to override the operator<< (and operator>>) for the required class.struct. Is this part of the code you haven't included?