how to understand what a class in c++ is used for code example
Example 1: create class instance c++
MyClass* MyObject = new MyClass();
Example 2: class in c++
class Name {
private:
int data;
public:
// Constructor
Name() {
// Code
}
int id;
void fun1(int a) {
// Some instructions here
}
}