Error de compilacion
Publicado por SuperIndio (11 intervenciones) el 28/11/2008 14:14:31
Tengo
class BinaryNode :public Object
{
float x;
float y;
char* name;
Object* object;
BinaryNode* parent;
BinaryNode* left;
BinaryNode* right;
public:
BinaryNode(BinaryNode* parent = null, const char* name = null, Object* object = null);
BinaryNode(BinaryNode* parent, const char* name, BinaryNode* left, BinaryNode* right);
~BinaryNode();
int configure(int x, int y);
char* getName() { return name; }
Object* getObject() { return object; }
BinaryNode* getParent() { return parent; }
BinaryNode* getLeft() { return left; }
BinaryNode* getRight() { return right; }
float getX() { return x; }
float getY() { return y; }
float reconfigure();
void print();
BinaryNode* search(const char* name);
BinaryNode* search(int nid);
void setName(const char* name1);
void setObject(Object* obj) { object = obj; }
void setParent(BinaryNode* parent1) { parent = parent1; }
void setLeft(BinaryNode* node) { left = node; }
void setRight(BinaryNode* node) { right = node; }
};
al compila me da este error:
warning: `BinaryNode::parent' will be initialized after
warning: `Object*BinaryNode::object'
warning: when initialized here
class BinaryNode :public Object
{
float x;
float y;
char* name;
Object* object;
BinaryNode* parent;
BinaryNode* left;
BinaryNode* right;
public:
BinaryNode(BinaryNode* parent = null, const char* name = null, Object* object = null);
BinaryNode(BinaryNode* parent, const char* name, BinaryNode* left, BinaryNode* right);
~BinaryNode();
int configure(int x, int y);
char* getName() { return name; }
Object* getObject() { return object; }
BinaryNode* getParent() { return parent; }
BinaryNode* getLeft() { return left; }
BinaryNode* getRight() { return right; }
float getX() { return x; }
float getY() { return y; }
float reconfigure();
void print();
BinaryNode* search(const char* name);
BinaryNode* search(int nid);
void setName(const char* name1);
void setObject(Object* obj) { object = obj; }
void setParent(BinaryNode* parent1) { parent = parent1; }
void setLeft(BinaryNode* node) { left = node; }
void setRight(BinaryNode* node) { right = node; }
};
al compila me da este error:
warning: `BinaryNode::parent' will be initialized after
warning: `Object*BinaryNode::object'
warning: when initialized here
Valora esta pregunta


0