<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Hi Tim,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">ITK indirectly includes windows headers, and your Arc class suffers a name clash with</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">WINGDIAPI BOOL WINAPI <b>Arc</b>( _In_ HDC hdc, _In_ int x1, _In_ int y1, _In_ int x2, _In_ int y2, _In_ int x3, _In_ int y3, _In_ int x4, _In_ int y4);</font><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default"><font face="verdana, sans-serif">in c:\Program Files (x86)\Windows Kits\8.1\Include\um\wingdi.h, line 3612. If your declarations are enclosed in a namespace ...</font><br></div><div class="gmail_default"><font face="verdana, sans-serif"><br></font></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">namespace Tim</font></div><div class="gmail_default"><font face="monospace, monospace">{</font></div><div class="gmail_default"><font face="monospace, monospace"> /* Forward declarations of Node and Arc classes since they are interdependant */</font></div><div class="gmail_default"><font face="monospace, monospace"> class Node;</font></div><div class="gmail_default"><font face="monospace, monospace"> class Arc;</font></div><div><font face="monospace, monospace"> ...</font></div><div><font face="monospace, monospace">}</font></div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">... the file compiles.</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">We are switching to <a href="https://discourse.itk.org/">discourse</a>, so please make future posts there.</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">Regards,</div><div style="font-family:verdana,sans-serif">Dženan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 21, 2017 at 5:36 AM, Timothee Evain <span dir="ltr"><<a href="mailto:tevain@telecom-paristech.fr" target="_blank">tevain@telecom-paristech.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Dženan!<br>
<br>
Sure, here you are :<br>
error C2061: syntax error : identifier 'Arc' 27<br>
error C2061: syntax error : identifier 'Arc' 31<br>
error C2143: syntax error : missing ';' before '*' 30<br>
error C2143: syntax error : missing ';' before '*' 49<br>
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 30<br>
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 49<br>
<br>
given with the following code (I haven't included the definitions has they are useless to reproduce the bug).<br>
Comment out the #include <itkImage.h> and everything is good.<br>
<br>
//////////////////////////////<wbr>//////////////////////////////<wbr>////////////////<br>
#include <string><br>
#include <itkImage.h><br>
<br>
/* Forward declarations of Node and Arc classes since they are interdependant */<br>
class Node;<br>
class Arc;<br>
<br>
/* CLASS : Node<br>
Class that defines a node or summit for the graph<br>
*/<br>
class Node<br>
{<br>
public:<br>
Node();<br>
Node(unsigned int NodeID);<br>
Node(unsigned int NodeID, int NodeLabel);<br>
Node(unsigned int NodeID, int NodeLabel, std::string NodeName);<br>
virtual ~Node();<br>
<br>
//Add an outgoing arc<br>
(27) void AddArc(Arc* OutwardArc);<br>
<br>
//Get/set the first outward arc<br>
(30) Arc* GetFirstOutwardArc();<br>
(31) void SetFirstOutwardArc(Arc* FirstArc);<br>
<br>
//Get/set the node ID<br>
unsigned int GetNodeID();<br>
void SetNodeID(unsigned int ID);<br>
<br>
//Get the number of arc that exit this node<br>
unsigned int GetArcCount();<br>
<br>
//Get/set the node name<br>
std::string GetNodeName();<br>
void SetNodeName(std::string InputName);<br>
<br>
//Get/set the node label<br>
float GetNodeLabel();<br>
void SetNodeLabel(float InputLabel);<br>
<br>
protected:<br>
(49) Arc* m_FirstOutwardArc;<br>
unsigned int m_ArcCount;<br>
unsigned int m_NodeID;<br>
std::string m_NodeName;<br>
float m_NodeLabel;<br>
};<br>
<br>
/* CLASS : Arc<br>
Defines a directionnal edge for graphs<br>
Each arc strictly have a starting and ending node<br>
*/<br>
class Arc<br>
{<br>
public:<br>
Arc();<br>
Arc(Node* StartingNode, Node* EndingNode);<br>
virtual ~Arc();<br>
<br>
//Get/set the starting node<br>
Node* GetStartNode();<br>
void SetStartNode(Node* StartingNode);<br>
<br>
//Get/set the ending node<br>
Node* GetEndNode();<br>
void SetEndNode(Node* EndingNode);<br>
<br>
//Get/set the next arc originating from the same node<br>
virtual Arc* GetNextArc();<br>
virtual void SetNextArc(Arc* NextArc);<br>
<br>
protected:<br>
Node* m_StartNode;<br>
Node* m_EndNode;<br>
<br>
private:<br>
Arc* m_NextArcFromSameNode;<br>
<br>
};<br>
<br>
Tim<br>
</blockquote></div><br></div></div>