+ 1
I am really confused on classes on c++. Can someone please give me a brief summary about them?
Also if you could describe overloading, that would be appreciated. Thanks.
4 ответов
+ 4
Will a Class is something used to group functions (methods) and data variables (fields) together while limiting access to these from outside the class. This is called encapsulation. A class can be thought of as a usually non-trivial user-defined type or a template that can be used to create objects (instances) of the class. New classes can also inherit properties and data from a parent class.
The functions (and operators) within a class can be overloaded. This means that several functions/methods of the same name can be defined but with a different set (number and/or types) of input parameters. These overloaded methods allow objects to have polymorphism meaning that the objects can display different behaviours depending on context or situation.
+ 6
Will
what exactly about classes, do you find confusing?
defined here
https://www.sololearn.com/learn/CPlusPlus/1709/
+ 2
Sort of Will .
+ 1
Monic so is a class like a prefab?