Protected only used when other classes inherit from the base class? lolwut?
i know confuses me too. In Java private does what protected does, so that really through me on a loop.
Rule of thumb: The C++ language is full of shit tricks like that. I myself don't even fully understand private and whatever
private = only to same class
protected = can be accessed by derived classes.
Originally Posted by freedompeace
private = only to same class
protected = can be accessed by derived classes.
Exactly. Basically, if you declare a method within a class as "protected", it can't be called from any class that doesn't inherit the base class. Private cannot be called from any other class, even if it inherits the base class. Correct me if I'm wrong on that freedom, but that's my understanding.
Perfect, Jason. Awesome explanation too. Though I might add it also extends to variables, not just methods
Originally Posted by freedompeace
Perfect, Jason. Awesome explanation too. Though I might add it also extends to variables, not just methods
Bah, details, who needs em?
Originally Posted by Jason
Bah, details, who needs em?
roflmao :)
What are all these vB noobs doing in our section? Learning C++? UNheard of
Originally Posted by fukojr2
What are all these vB noobs doing in our section? Learning C++? UNheard of
Jason and dat N word Dont even belong in the same sentence..
freedom programs in C++ and Jason is just too cool.
As much as it pains me to fraternize with you shit++ fags (lubchoo 4 r3al <3), programming has common elements (such as these).
Oh and Tweak, I think I'm the only VB guy in the whole thread
Originally Posted by Jason
As much as it pains me to fraternize with you shit++ fags (lubchoo 4 r3al <3), programming has common elements (such as these).
Oh and Tweak, I think I'm the only VB guy in the whole thread
programing is just like speaking. Its done in multiple languages.
Originally Posted by whit
programing is just like speaking. Its done in multiple languages.