[try Beta version]
Not logged in

 
fille

Feb 19, 2017 at 2:57pm
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?
Last edited on Feb 19, 2017 at 3:39pm
Feb 19, 2017 at 3:15pm
Feb 19, 2017 at 3:35pm
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;
dat<<name<<""<<lastname<<endl;
}
dat close()
}
Topic archived. No new replies allowed.