class definition in cpp code example
Example 1: classes c++
class class_name {
access_specifier_1:
member1;
access_specifier_2:
member2;
...
} object_names;
Example 2: create class instance c++
MyClass* MyObject = new MyClass();
Example 3: class cpp
class Exemple
{
private:
/* data */
public:
Exemple(); //Constructor
~Exemple(); //Destructor
};
Example 4: C++ class
class Personnage
{
}; // N'oubliez pas le point-virgule à la fin !