|
-
June 6th, 2012, 04:21 AM
#6
Re: Storing objects of an hierarchy in a vector
Alternatively, You could create an ActionHolder class, which stores a pointer to an Action.
Also known as the opaque pointer design pattern.
Is your question related to IO?
Read this C++ FAQ article at parashift by Marshall Cline. In particular points 1-6.
It will explain how to correctly deal with IO, how to validate input, and why you shouldn't count on "while(!in.eof())". And it always makes for excellent reading.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|