class Int {
int n;
public:
Int(int n) {
this->n = n;
}
};
vs
class Int {
int n;
public:
Int(int n) : n(n){
}
};
What is essentially the difference between these two and when should one use the this
keyword when creating a new object of a given class?