and my code to write into a file is

ofstream file; 
file.open("CustomerFile.txt",ios::app); 
file.write((char *) & customer,sizeof Customer); 
file.close(); 

file.open("AccountFile.txt",ios::app); 
file.write((char *)& account,sizeof Account); 
file.close(); 

can someone figure out my mistakes. Thanks in advance

What is the problem you are having? Are you getting any errors?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.