Page 512 - C++
P. 512
Telephone Directory System
A project to keep record of Residents, their Telephone numbers and yellow pages.
struct Date
{
int dd,mm,yy;
};
class Resident
{
char Telephone[9];
char Name[30],FatherName[20],Address[30], pincode[8];
public:
void RGetdata();
void RDisplaydate();
char * Return_Rcode()
{
return Telephone;
}
char *Return_name() { return Name; }
char Return_Address ( )
{
return Adddress;
}
};
class Yellow_Pages
{
char Company_name[30],CAddress[30],Product[30],Specialization[30];
int noofphones;
char phone[10][20];
public:
void YGetdata();
void YMdisplaydata();
char * Return_CompName()
{
return Company_name;
}
char * Return_Product()
{
return Product;
}
int * Check_phone(char *p)
{
for(int i=0;i<noofphone;i++)
{
if (strcmp(phone[i],p)==0)
return 1;
}
return 0;
}
};