I know classes are a big part of C++ and help to make it more readable. However, I am unclear as to how classes really work.
I know this much:
class randomclass{
protected:
/* Protected code here */
private:
/* Private code here */
public:
/* Public code here */
};
My question on this part, what type of code is recommended in each part of the class? For instance, what type of code would go in the public class, protected class, and private class assignments?
I usually leave all code in the public, because I never know what would be best in each area.
Next question:
What is the difference between these two class inheritences: randomclass.variable vs randomclass->variable?
Thanks for the help in advance.

New Topic/Question
Reply




MultiQuote






|