Hi guys,
I am stuck with this piece of code for a long time.
The errors that come are:
bfs.cc: In function 'void greedyMatch()':
bfs.cc:9: error: expected initializer before '*' token
The relevant code is
#define forallXNodes(u,G) \ for(arc *bfs_ee=(G.getSource())->firstOutArc(),arc *bfs_stopA=(G.getSource())->lastOutArc(),u=bfs_ee->head(); bfs_ee <= bfs_stopA;u = (++bfs_ee)->head())
#define forallYNodes(u,G) \
for( arc *bfs_ee=(G.getSink())->firstOutArc(),arc *bfs_stopA=(G.getSink())->lastOutArc(),u=bfs_ee->head(); bfs_ee <= bfs_stopA; u = (++bfs_ee)->head())
There is something that is wrong in these for loops.Actually the file bfs.cc where these errors are coming is the file in which these #define have been made and line 9 where an error is coming is the line where forallXnodes is written .............and hence an error is coming.......
Any help shall be appreciated............
I am using GNU g++ compiler.
Thank you!