how do i display this struct i have??
i want to be able to display wut i input in the struct. heres the code:
Code:
struct agendaview
{
char name[15];
char tel [10];
char adress[50];
};
//this is the struct code
void newperson ()
{
agendaview *newperson ;
newperson = new agendaview ;
if (newperson != NULL )
{
cout<<"Name:";
cin.get (newperson->name[15]);
cin.ignore (80,'\n');
cout<<"TEL:";
cin.get (newperson->tel[10]);
cin.ignore (80,'\n');
cout<<"Adress:";
cin.get (newperson->adress[50]);
cin.ignore (80,'\n');
}
}
//this is how i enter the data.
now i need to know how do i display the data i input.
something like this:
name tel adress
------------------------------------------------------------------------------
(wutever) (wutever) (wutever)
thx in advance.