Can anyone why this code does not work? It says that this operator does not exists or something like that. Please help me
void Account::read_rec()
{
std::ifstream infile;
infile.open("record.bank", std::ios::binary);
if (!infile)
{
std::cout << "[Error] File Not Found!" << std::endl;
return;
}
std::cout << "\n***** Data from file *****" << std::endl;
while (!infile.eof())
{
if (infile.read(reinterpret_cast<char*>(this), sizeof(*this) > 0))
{
show_data();
}
}
infile.close();
}