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});
}
}
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});
}
}