|
-
January 21st, 2011, 03:40 PM
#14
Re: Class design
Again, anywhere where you're returning *this, your return type needs to be a MyString&.
The whole ** thing just doesn't make sense. As far as I know, there's no way to do it. When you're operating with pointers such as
MyString** pp = p, you're not even dealing with your MyString object. You're just assigning one memory address to another in a way that doesn't make sense and won't work.
You're telling the compiler that pp will point to a MyString pointer, then assigning it to an address that points to a MyString object. It's a nonsensical concept that you should strop trying to implement.
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
|