Error de compilacion
Publicado por SuperIndio (8 intervenciones) el 28/11/2008 14:21:23
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; }
};
y me gcc me tira este error:
44: warning: `BinaryNode::parent' will be initialized after
43: warning: `Object*BinaryNode::object'
44: 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; }
};
y me gcc me tira este error:
44: warning: `BinaryNode::parent' will be initialized after
43: warning: `Object*BinaryNode::object'
44: warning: when initialized here
Valora esta pregunta


0