些細な質問で申し訳ありません:
実装 1:
class Foo
{
protected: int bar;
public: Foo(int bar)
{
this->bar =bar;
}
};
実装 2:
class Foo
{
protected: int bar;
public: Foo(int bar)
{
this.bar =bar;
}
};
実装 2 からの出力:
request for member ‘x’ in ‘this’, which is of pointer type ‘Foo* const’ (maybe you meant to use ‘->’ ?)
this
ポインターもそうです。この質問にはコードに構文エラーがあります