c++でポインタへのポインタは合法ですか? 私はこのSOの質問に出くわしました: Pointer to Pointer to Pointer
しかし、それが正当な c++ であるかどうかは明確ではありません。私が持っているとしましょう:
class A{
public:
void foo(){
/* ect */
}
};
class B{
public:
A* a;
/* ect */
};
void Some_Func() {
B *b;
// besides this looking ugly, is it legal c++?
b->a->foo();
};
線はb->a->foo()
書いて大丈夫ですか?この表現をより適切に表現する方法はありますか?