0
correct me if I'm wrong
classes are small programs in the main program that will make the program parts and like functions we can use them with input our value to it and tell it which function and what value do we want to run????
2 Respostas
+ 3
Classes don't have to be in the main, they can be standalone files in the form of a .cpp file and a .h file.
Classes are structures used in C++ in which we can store members, such as variables and functions, along with certain access specifiers for these members (public, protected and private). These members can be accessed with objects.
The great thing about classes are concepts like inheritence and polymorphism, which is where C++ shines as an object oriented language.
0
Not exactly, classes are like a rubric for how every object of that class should be made. They can have variables, functions and even other classes. Every object you declare of a class will have access to the classes public variables and functions