OpenWaterAnalytics / epanet-rtx

Real-time extension to the EPANET hydraulic toolkit
Other
58 stars 43 forks source link

About model.cpp #102

Closed YangZhang18 closed 8 years ago

YangZhang18 commented 8 years ago

I have a question about compile the model.cpp & AggregatorTimeSeries.cpp . The error place is “ linkDescriptors.push_back((LinkDescriptor){link, from,to});”. I am a freshman in c++ , please help me . typedef struct { Link::sharedPointer link; int fromIdx, toIdx; } LinkDescriptor;

// load up the link descriptor lookup table vector linkDescriptors; { int iNode = 0; BOOST_FOREACH(Node::sharedPointer node, _nodes | boost::adaptors::map_values) { nodeIndexMap[node] = iNode; ++iNode; } BOOST_FOREACH(Link::sharedPointer link, _links | boost::adaptors::map_values) { int from = nodeIndexMap[link->from()]; int to = nodeIndexMap[link->to()]; linkDescriptors.push_back((LinkDescriptor){link, from,to}); } }