You are writing C++ in C!!
...and I forgot to use code tags!
Here:
Code:
class agendaview { public:
char name[15];
char tel [10];
char adress[50];
agendaview( char *Name, char *Tel, char *Address)
{
strncpy(name, Name, 15);
strncpy(tel, Tel, 10);
strncpy(adress, Address, 15);
}
void create(){
cout<<"Name:";
cin.get (name, 15);
cin.ignore (80,'\n');
cout<<"TEL:";
cin.get (tel, 10);
cin.ignore (80,'\n');
cout<<"Adress:";
cin.get (adress, 50);
cin.ignore (80,'\n');
}
void print() {
cout<<"Name:";
cout<<name;
cout<<"TEL:";
cout<<tel;
cout<<"Adress:";
cout<<adress;
}
};
int main()
{
agendaview Ralph("Ralph", "2146162352", "5720 maple Ave");
agendaview New;
New.create();
Ralph.print();
New.print();
return 0;
}