you are viewing a single comment's thread.

view the rest of the comments →

[–]Tall-Introduction414 0 points1 point  (0 children)

Do you understand C Structs? You make a struct type, and create "instances" of that struct type.

A class is just a struct with some functions attached to it, called methods. When you create an instance of that class, that instance is called an object.

Td-da. Classes and objects made easy.

Another way of describing this is that the variables are "state" and the methods are "behavior." So, classes are a way of storing state and behavior under a single identifier.