Dear all I have a function and withing I want to call a member funtion.
More specifically I have a menu inplemented the code below.
please note the commented line
case '1':
//flightcode();
break;
case '2':
cout<<"Enter the Customers National Number ID"<<endl;
cin>>ni;
// CustArray.showCustomers(ni);//given the customers ID
break;
case '3':
//membershiptype();
I have a member funtion into my classes declaration. I have 150 objects because I declare them in the main
Customers *CustArray=new Customers[150];
void Customers::showCustomers(int ni)
{
for (int i=0; i>150;i++)
{
if (ni==customer_id)
{
cout <<"Customer Information"<<endl;
cout <<"*********************"<<endl;
cout<<"Customer ID:"<< customer_id <<endl;
cout<<"ID:"<< id <<endl;
cout<<"Name:"<< name <<endl;
cout<<"Address:"<< address <<endl;
cout<<"Membership:"<< membership <<endl;
cout<<"----------------------------"<<endl;
}
}
How I am going to call this function given that the user will enter his/her id?
Then I will search thgout all the created objects and show user info.?