Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Multiple Users
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
The_$hit




PostPosted: 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?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Apr 06, 2005 8:24 am   Post subject: (No subject)

using multiple instances of the said class
The_$hit




PostPosted: Wed Apr 06, 2005 11:05 am   Post subject: (No 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?
Martin




PostPosted: Wed Apr 06, 2005 11:11 am   Post subject: (No subject)

Be more specific. What are you trying to do?
The_$hit




PostPosted: Mon Apr 11, 2005 5:19 pm   Post subject: (No 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.
wtd




PostPosted: Mon Apr 11, 2005 8:29 pm   Post subject: (No 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];
}
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: