fille

I am trying to crete a file of telephone subscribers, where you enter name ,lastname and the phone number of the subscriber (via testatura) and then print the TABLE of this informations.Help?
this is the enter, but what about the table:?
please correct me

#include<iostream>
#include<fstream>
using namespace std;
int main()
{
int n,i ,name,lastname,number;
ofstream dat;
ifstream dat1;
dat.open("Phonebook.dat");
cout<<"How much numbers";
cin>>n;
for(i=1;i<=n;i++)
{
cout<<"enter name and last name:";
cin>>name>>lastname>>number;
dat<<name<<""<<lastname<<""<<number<<endl;
}
dat close()
}
Topic archived. No new replies allowed.