Im not good at English.. sorry
for example,
struct structure1
{
structure2 st;
}
struct structure2
{
structure1 st;
}
It has incomplete type error
How can I use this code??
It is work well in java but in c++ I think because top down process..
I wonder It has solution good work
This is my real code
It is part of graph algorithm
struct Edge
{
Node destination;
int capacity;
int cost;
Edge dual;
Edge(Node n, int c, int s)
{
capacity = c;
cost = s;
destination = n;
dual.cost = -9999;
}
};
struct Node
{
int cost;
vector<Edge> edges;
Edge from;
string name;
bool onq;
Node()
{
from.capacity = -9999;
}
void clear()
{
cost = 0;
edges.clear();
from.capacity = -9999;
}
};
Thank you!!