次のような単純なツリー構造体を C++ で実装したいと考えています。
struct node{
....
node* parent;
node[]* children;
....
};
しかし、コンパイラはエラーを報告しました (CLang++ と G++ の両方)
error: expected unqualified-id before '[' token
node[]* child;
^
error: expected ',' or '...' before '*' token
node(node[]* c): : child = c; {}
^
このようなもの
ところで、一部の C++ 11 機能に -std=c++11 フラグを使用しています
どんな助けも感謝します