#include <iostream>
using namespace std;
class client
{
private:
int choice;
int age;
int height;
int weight;
char *name;
public:
void menu();
void setStats();
void task();
};
//========================================================
void client::menu()
{
cout<< "MENU \n";
cout<< "1. enter data \n";
cout<< "2. view data \n";
cout<< "3. quit \n";
int chc;
cin>> chc;
choice=chc;
}
//========================================================
void client::task()
{
switch(choice)
{
case(1): setStats();
}
}
//========================================================
void client::setStats()
{
int i,j,k;
char *n;
cout<< "name- "; cin>> n;
cout<< "age- "; cin>> i;
cout<< "height-"; cin>> j;
cout<< "weight-"; cin>> k;
name=n; age=i; height=j; weight=k;
}
//========================================================
int main()
{
client clients;
clients.menu();
clients.task();
}
posted this one for easier understanding of my question, no need to look deeper into the code.
the question is, how to make multiple output. say i got clients named a,b,c.
how do i enter the data of those 3 and then print it all out? please keep it as simple as possible :)