Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
Dynamically creating objects
Morgan Hein
16y
2.9k
1
Reply
I know this is something that is common, but I just can't find a suitable answer anywhere on the internet. The keywords that I think pertain to my problem are not correct, so I can't figure out what to search for! Even someone linking me to a page about this would be helpful!
Let's say my program takes a text file (a story) as input, and I want to create an instance of the custom class "Person" for every person named in the text file. How do I do this? How can I dynamically create the objects, without knowing what the names are beforehand?
How can I later call those objects and their functions/variables w/o knowing the name of the object(s)?
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
how to lock dir from access by another process
Treeview control in windows forms