What are the differences between classes and functions? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 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.

4th Aug 2017, 1:18 AM
Umbe
Umbe - avatar
2 ответов
+ 4
Honestly still a bit complicate the use of classes but it helped. Thank you all
4th Aug 2017, 12:53 PM
Umbe
Umbe - avatar
+ 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!
4th Aug 2017, 10:08 AM
Afreen
Afreen - avatar