So far in our discussions of classes you might 
have noticed the similarity between classes and 
structs. Well as it turns out, classes and structs
are the same thing. Both can have public and 
private sections though when we went over 
structs, you didn't see that it had both public and
private sections. It's actually the case that it can.
Both can have member variables, both can have 
member functions, even structs.
Turns out that you can put functions in structs. 
But the differences, it's very simple. A struct 
defaults to public. Notice that I didn't identify any
public or private section in my structs. If I did put 
public, then I've changed nothing because 
everything by default in the struct definition is
public. However, if I put a private section in there 
then that would be different
and I would treat it just like it was a class really. 
Class members, they default to private.
Which means that if you don't label a particular 
section, it's going to be a private section.
So, let's take a look at some equivalent 
examples. On the left: struct boot.
We have two float members. What are they? 
They're both public even though it's not labeled,
they're both going to be public. What about the 
middle one? Struct boot public, those two are 
identical,
the one on the left and one in the middle because 
on the left it defaults to public, in the middle it is 
stated
explicitly public. They're the same. And then on 
the far right,
we have: boot public float and float, but it's a 
class. Is that any different? No, none whatsoever. 
In fact it would compile exactly the same
if I scratched that out and put struct. It would be 
identical. Another example, suppose we have
a class of table items. Okay, notice that on the left 
I have private and public.
So I have fold, a function in the public section
and an int and a float (number of legs and the top 
area) in the private. Look in the middle box here. 
Notice that "numLegs", "top area"
don't have a designation as being public or 
private. So, what are they? They default to private 
and
of course fold is still in public. So, this version and 
this version
are identical and that's going to be identical to 
struct table and fold is not designated as being 
either public or private,
by default its public. It's identical to the other two.
Well, traditionally you use classes when you want 
an object to have functionality. You use structs 
when you want the objects to have only variables.
And I think that structs are simply a holdover from 
the old C programming language. And that's the 
difference between classes and structs.
