-
October 17th, 2013, 12:43 PM
#13
Re: template for events
Originally Posted by Cambalinho
with 1 parameter. but i still confuse
how we can initializate the m_foo?
What feature of a constructor does all of your code that you post is missing? It is a feature that you should be using, but you never used it. In some ways, this feature is not a requirement, but it is a requirement if any member variables do not have default constructors.
Now given all of that, do you know what this "feature" is that
1) You seem to never use which you should start to use and
2) Is required to initialize members that cannot be default constructed (like the m_foo variable, and the events variable in your class.
?
That is your homework. Believe me, this is covered in beginner C++ books. The code I posted is beginner code, but from the looks of it, you can't fix it. I know it's humbling, but seriously, this indicates that you need to learn the fundamentals before embarking on this other code you're trying to write.
Regards,
Paul McKenzie
Last edited by Paul McKenzie; October 17th, 2013 at 12:45 PM.
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
|