Create object in runtime

A

Allen

I want to make a program which can allow the user to hire employees at
regular bases. In other words, every time an employee is hired the program
should be able to create an object by itself for that employee.
What I want is that; every time the user enters a new employee the program
will create a new object for such employee.

The user can enter, for example, the name and number of a new employee and
the program will create an object for such employee. The reason I want to
do that is I do not want to create 50 objects and latter know that the user
needs only 30 object or may be the user needs more than 50 object. At the
end, as the program will be used by different users, every user can have
exactly the number of objects needed.
 
P

Patrice

A bit unclear...

It looks like you are looking for a data structure, such as
http://msdn.microsoft.com/en-us/library/6sh2ey19.aspx that allows to store a
list of objects. Also depending on what the application does, you won't
necessarily have an object for each user. Sometimes you just have in memory
those objects the user currently deals with and they are retrieved/stored as
needed from a database...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top