For example, is this any of the following
- Bad practice
- Unreadable
- Inefficient (the call to
this
pointer) - Any other reason why it's bad to do this
.
class Person {
public:
string name;
Person(string name) {
this->name = name;
}
};
P.S.
How about Person(string name) : name(name) { }