[ITK] Naming conflict ?
Timothee Evain
tevain at telecom-paristech.fr
Tue Nov 21 05:36:50 EST 2017
Hi Dženan!
Sure, here you are :
error C2061: syntax error : identifier 'Arc' 27
error C2061: syntax error : identifier 'Arc' 31
error C2143: syntax error : missing ';' before '*' 30
error C2143: syntax error : missing ';' before '*' 49
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 30
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 49
given with the following code (I haven't included the definitions has they are useless to reproduce the bug).
Comment out the #include <itkImage.h> and everything is good.
////////////////////////////////////////////////////////////////////////////
#include <string>
#include <itkImage.h>
/* Forward declarations of Node and Arc classes since they are interdependant */
class Node;
class Arc;
/* CLASS : Node
Class that defines a node or summit for the graph
*/
class Node
{
public:
Node();
Node(unsigned int NodeID);
Node(unsigned int NodeID, int NodeLabel);
Node(unsigned int NodeID, int NodeLabel, std::string NodeName);
virtual ~Node();
//Add an outgoing arc
(27) void AddArc(Arc* OutwardArc);
//Get/set the first outward arc
(30) Arc* GetFirstOutwardArc();
(31) void SetFirstOutwardArc(Arc* FirstArc);
//Get/set the node ID
unsigned int GetNodeID();
void SetNodeID(unsigned int ID);
//Get the number of arc that exit this node
unsigned int GetArcCount();
//Get/set the node name
std::string GetNodeName();
void SetNodeName(std::string InputName);
//Get/set the node label
float GetNodeLabel();
void SetNodeLabel(float InputLabel);
protected:
(49) Arc* m_FirstOutwardArc;
unsigned int m_ArcCount;
unsigned int m_NodeID;
std::string m_NodeName;
float m_NodeLabel;
};
/* CLASS : Arc
Defines a directionnal edge for graphs
Each arc strictly have a starting and ending node
*/
class Arc
{
public:
Arc();
Arc(Node* StartingNode, Node* EndingNode);
virtual ~Arc();
//Get/set the starting node
Node* GetStartNode();
void SetStartNode(Node* StartingNode);
//Get/set the ending node
Node* GetEndNode();
void SetEndNode(Node* EndingNode);
//Get/set the next arc originating from the same node
virtual Arc* GetNextArc();
virtual void SetNextArc(Arc* NextArc);
protected:
Node* m_StartNode;
Node* m_EndNode;
private:
Arc* m_NextArcFromSameNode;
};
Tim
More information about the Community
mailing list