mkwan
Tech
greetings,
I am trying to compile a binary tree application source code and I am getting compiler errors stated below:
[localhost(iBook):cnt252/examples/BTree] mkwan% c++ -g main.cpp BTree.cpp -o binary
In file included from main.cpp:1:
BTree.h:32: `typedef struct Node * pNode' redeclared as different kind of symbol
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/AE.framework/Headers/AERegistry.h:917: previous declaration of `enum {anonymous} pNode'
In file included from BTree.cpp:10:
BTree.h:32: `typedef struct Node * pNode' redeclared as different kind of symbol
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/AE.framework/Headers/AERegistry.h:917: previous declaration of `enum {anonymous} pNode'
[localhost(iBook):cnt252/examples/BTree] mkwan%
this is part of the source code below:
struct Node
{
Node *pL_child;
Node *pR_child;
int iData;
Node(void)
{
pL_child = 0;
pR_child = 0;
}
};
typedef Node* pNode;
.
.
.
and yet I get no compiler errors in visual c++ program...can anyone help me?
I don't know if I made my question clear enough...I apologize for that
mkwan
I am trying to compile a binary tree application source code and I am getting compiler errors stated below:
[localhost(iBook):cnt252/examples/BTree] mkwan% c++ -g main.cpp BTree.cpp -o binary
In file included from main.cpp:1:
BTree.h:32: `typedef struct Node * pNode' redeclared as different kind of symbol
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/AE.framework/Headers/AERegistry.h:917: previous declaration of `enum {anonymous} pNode'
In file included from BTree.cpp:10:
BTree.h:32: `typedef struct Node * pNode' redeclared as different kind of symbol
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/AE.framework/Headers/AERegistry.h:917: previous declaration of `enum {anonymous} pNode'
[localhost(iBook):cnt252/examples/BTree] mkwan%
this is part of the source code below:
struct Node
{
Node *pL_child;
Node *pR_child;
int iData;
Node(void)
{
pL_child = 0;
pR_child = 0;
}
};
typedef Node* pNode;
.
.
.
and yet I get no compiler errors in visual c++ program...can anyone help me?
I don't know if I made my question clear enough...I apologize for that
mkwan