+ 4
What are the differences between classes and functions?
I have no experience in oops so I want some advice from you that can help me understand how to effectively use classes in c++. Thank you.
4 Answers
+ 4
Honestly still a bit complicate the use of classes but it helped. Thank you all
+ 1
oop is all about objects-objects can be anything that you now obviously like car, fan... In oops an object is defined to have some attributes and behaviors. For instance, car has wheels, gears, windows, doors as it attributes and it starts, accelerate, stops, plays music as it behaviors.
In oop we have yo represent many objects generally so we define class which has all description of objects-attributes and behaviors.
We technically call behaviors:methods/functions
attributes:variables and constants
So as above people said that class is just abluepront of objects and methods are the behaviors of object which are described through class.
Hope it helps!