Computer Science Canada

Multiple Users

Author:  The_$hit [ Tue Apr 05, 2005 6:22 pm ]
Post subject:  Multiple Users

Does any one know how to create multiple users in C++ using only a single class?

Author:  Tony [ Wed Apr 06, 2005 8:24 am ]
Post subject: 

using multiple instances of the said class

Author:  The_$hit [ Wed Apr 06, 2005 11:05 am ]
Post subject: 

How do you do it so the user can make an instance and then call on any of the other instances that they have created?

Author:  Martin [ Wed Apr 06, 2005 11:11 am ]
Post subject: 

Be more specific. What are you trying to do?

Author:  The_$hit [ Mon Apr 11, 2005 5:19 pm ]
Post subject: 

i am trying to enable the user to create a new user save its data create many more and then be able to call on any one of the users to recall its information. I would like the pr ogram to allow a person to log in and out of accounts. I was thinking of doing this by creating an array of pionters to a class but i cannot figure out how to let the user call on a certain instance.

Author:  wtd [ Mon Apr 11, 2005 8:29 pm ]
Post subject: 

The_$hit wrote:
i am trying to enable the user to create a new user save its data create many more and then be able to call on any one of the users to recall its information. I would like the pr ogram to allow a person to log in and out of accounts. I was thinking of doing this by creating an array of pionters to a class but i cannot figure out how to let the user call on a certain instance.


code:
class User
{
   /* yada yada */   
};

int main()
{
   std::vector<User> users(10);

   // accessing the 2nd user
   users[1];
}


: