enter new record

program that consists of structure/s and file/s. The structure can store the following information about a customer account for a credit card company.
Name
Address
Telephone number
Total credit balance
Date of last payment

enter new records into the file with all the information above.
What is the question? Do you want someone to solve your homework?
my coding my im not sure either it correct or not.

#include <iostream>
#include <iomanip>
#include <fstream>

using namespace std;

struct det
{
char state[20];
char city[20];
int postcode;
};

struct cuac
{
char name[20];
char address[50];
det address2;
int phonenum;
double balance;
char date[20];
};


int main()
{
int ans;


cout <<"1.Open new Customer account."<<endl;
cout <<"2.Search & display customer record."<<endl;
cout <<"3.Search & delete customer account."<<endl;
cout <<"4.Search & change customer account."<<endl;
cout <<"5.Display the entire archive."<<endl;
cout <<"6.Exit."<<endl;
cout <<setprecision(2)<<showpoint<<fixed;
cin >> ans;

switch(ans)
{
case 1:write();
break;
case 2:read();
Topic archived. No new replies allowed.