Question for Classes/Struct
*Warning* Noob C++ coder here. Dumb question, please answer kindly. Thank you.
------------------------------------------------------------------------------------------------------------------------------------------------
Okay I'm just wondering what is the point of "class". I mean, the guy doesn't really tell much about classes. I know the difference between class and struct is that struct is public by default and class is private by default.
But since in C++ Console Programming you cannot change the values of anything inside private functions, why the hell would you even put it?
Also, if you put "class", then everything will be unchangeable... What's the point?
Like if you do:
You can't change anything in there, like you cant do this all of a sudden..
So what's the point of classes?
I KNOW IT'S A DUMB QUESTION, BUT I'M A NOOB.
------------------------------------------------------------------------------------------------------------------------------------------------
Okay I'm just wondering what is the point of "class". I mean, the guy doesn't really tell much about classes. I know the difference between class and struct is that struct is public by default and class is private by default.
But since in C++ Console Programming you cannot change the values of anything inside private functions, why the hell would you even put it?
Also, if you put "class", then everything will be unchangeable... What's the point?
Like if you do:
Code:
class MPGH
{
a=0
b=0
c=0
d=0
};
Code:
class MPGH
{
a=0
b=0
c=0
d=0
};
int main()
MPGH Box
Box.a=2
*I know the code is wrong it's just an example guys*
I KNOW IT'S A DUMB QUESTION, BUT I'M A NOOB.
