hi all,
I guess i'm missing somthing, because this header file just won't complile.
I get loads of errors....
the first error is marked, (".... error C2143: syntax error : missing ';' before 'const')
i didn't bother marking the subsequent errors... (ther're all very similar)
thanks
Code://Graph.h #ifndef _GRAPH_ #define _GRAPH_ #include <iostream> //#include "LinkedList.h" using namespace std; /**************FORWARD DECLARATIONS******************************************/ class LinkedList; class EdgeNode; class Edge; class Vertex; class Node; class EdgeList; /*********************END OF FORWARD DECLARATIONS***************************/ class Graph { private: LinkedList *m_list; int m_countVer; public: //locate edge. return pointer to location or NULL (if not found) EdgeNode* findEdge const(const int &source,const int &dest); // <--- ERROR!!! //find vertex (by id value) Node* findVer const(const int & id); //find vertex (by vertex) Node* findVer const(const Vertex &); //Ccot Graph(const Graph & g2); //ctor Graph(); //dtor ~Graph(); //add vertex to graph (check if not exist first) void addVer(const Vertex & v1); //add edge to graph, add vertexes if not exist void addEd(const int & sourceId, const int & destSource); //delete vertex (argument- vertex) void delVer(const Vertex & v1); //delete edge. void delEd(const Edge & ed1); //delete edges (by id) void delEd(const int & source,const int & dest); //operator union Graph operator+ const (const Graph & g2); //operator substarct Graph operator- const (const Graph & g2); }; #endif