At the consturctor Node = new Node[numberOfNodes]; and Edge = new Edge[numberOfEdges]; gives identifier error? what's the wrong with it ?
typedef struct node
{
int id;
int x;
int y;
} Node;
typedef struct edge
{
int id;
Node node1;
Node node2;
} Edge;
class graph
{
private:
int numberOfNodes;
int numberOfEdges;
int *Node;
int *Edge;
public:
graph(int nodes, int edges)
{
numberOfNodes = nodes;
numberOfEdges = edges;
Node = new Node[numberOfNodes];
Edge = new Edge[numberOfEdges];
}