|
-
August 15th, 2011, 04:48 PM
#10
Re: Why would vector::size() give a garbage value ?
 Originally Posted by Lindley
Run this simple program. You should observe the same error. The problem is that your copy constructor is not correct, and you also have not defined operator=.
Ok, I added, at least, what I assume is a reasonably correct set of operator='s. I also added a non-const copy constructor. Which is what I am assuming is what you meant by that my constructor isn't correct. I am still getting the same errors though...
I added an updated file to post #8 with these corrections.
I am not sure what more I need to do to my constructors and operator='s to make them any better, but since you informed me that that was the problem then I am sure I will eventually figure it out.
But if you or anyone would like to help, I ,obviously, would be relieved of a little burden.
I also have attemted to make CApplication a singleton. I think some more refinement needs doin' though.
Thanks Lindley
Last edited by kmkkra; August 15th, 2011 at 05: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
|