Okay, well, that's a bit limited. What i would
really recommend for you is to read up on classes. (keep in mind, the only difference between class and struct in C++ is that class members are default private)
How I would approach this problem:
Create a client class, which would look something along the lines of this:
1 2 3 4 5 6 7 8 9 10 11 12
|
class Client
{
public:
//functions here to do all the things you want with Client
//such as:
Client(std::string _fname, std::string _lname /*....*/) //constructor that sets data member values
void printInfo() //prints all info
bool checkPassword(string pwd) //returns true if the pwd matches password.
private:
std::string fname, lname, address, telephone, mobile, email, password
int accNumber;
};
|
If you have your code structured like that, it accomplishes two very important things. The first is that everything is extremely organized. The second is that it's the beginning of grounds to create multiple clients.
1 2 3 4 5 6 7 8 9 10
|
int main()
{
Client clientOne;
clientOne.create() //assuming we created a function called create.
//create would call things like firstname(), lastname(), telephonenum(), and such
//that you defined in your existing code.
Client clientTwo;
//....
]
|
You could continue to create a vector that holds all the clients. If you haven't heard of a vector, it's like a dynamically expanding array; so the size isn't fixed and you can put as many items in it as you want.
http://www.cplusplus.com/reference/vector/vector/
Since this is a larger project idea, consider getting a pencil and paper and mapping out how you want it to be structured before you get to coding. That's always really helpful.
Hope I helped without creating too much confusion.