#ifndef ASSETS_H_INCLUDED
#define ASSETS_H_INCLUDED
#include <vector>
#include string.h>
const int ID_Max = 100;
typedef char ID[ID_Max];
struct node;
struct people{
std::vector<ID> T_ID;
std::vector<node*> Nodes;
people(ID t, node* person){
T_ID.push_back(t);
Nodes.push_back(person);
}
people(){}
};
struct node {
ID T_ID;
node* Parent;
people* leftChildren;
node* rightChild;
node(ID t, node* p, node* l, node* r) :I_ID(t), Parent(p), rightChild(r)
{leftChildren = new people(); }
};
#endif // ASSETS_H_INCLUDED
我的问题是它在构造函数中将 ID 解释为 char 指针,所以当我希望 people::people(char[ID_Max], node*) 相同时,这是构造函数 people::people(char*, node*)节点。如果您有建议,将不胜感激。