|
-
December 1st, 2010, 09:10 AM
#4
Re: Using getter and setter in Class
 Originally Posted by abakiz
Ahh thanks,
Well how do I implement the Getter and Setter using a struct?
I've tried cout << = *mp->name;
But I just get lots of errors :-/
Your question on the surface really makes little sense. Typically a Set method just takes a value as an argument and assigns it to a member of a class or struct. A Get method just returns a member of a class or struct.
So, what are you really trying to do. Explain what you want to do, not how you want to do it.
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
|