class in C++

Classes are declared by using the class keyword followed by an identifier.
* C++ class has no class-level access modifier. 
* The name of the class follows the class keyword. The name of the class must be a valid identifier. 
* The remainder is the class body, where the class members are defined, including fields, and methods.
```
#include <iostream>

//[class] - [identifier]
class Program {
    // Fields and methods go here...
public:    
    int v;
};

int main() {
    Program p;   
    std::cout<<p.v;
}
```
In C++, the only difference between a class and a struct are the default accessibility. Struct members are public by default whereas class members are private by default. It is good practice to use classes when you need an object that has methods, and structs when you have a simple data object.
In C++, the compiler automatically generates the default constructor, copy constructor, copy-assignment operator, and destructor for a type if it does not declare its own. These functions are known as the special member functions, and they are what make simple user-defined types in C++ behave like structures do in C. That is, you can create, copy, and destroy them without any additional coding effort. C++11 brings move semantics to the language and adds the move constructor and move-assignment operator to the list of special member functions that the compiler can automatically generate.