So I have a function written as follows
and now I have to takeCode:inline tSomething::tSomething(map<int, tSomethingElse* > const & Points, tWhatever const * a_ptr, int ID, vector<vector<int> > const & one, vector<bool> const & two, vector<int> const & three): _ID(ID),_a_ptr(a_ptr),_points(Points),_one(one),_two(two),_three(three) { for (map<int,tSomethingElse*>::const_iterator it = _points.begin(); it != _points.end(); it++) _stamp.push_back(it->first); sort(_stamp.begin(),_stamp.end()); Target(); }
and write a for loop that does the same thing, so...Code:inline tSomething::tSomething(std::vector<tSomething::tSomethingElse*, std::allocator<tSomething::tSomethingElse*> >& Points, tWhatever const * a_ptr, _a_ptr(a_ptr),_points(Points)
but I am having trouble adapting the code. Is it straightforward or not really possible with the change of format?Code:{ for (???) _stamp.push_back(it->first); sort(_stamp.begin(),_stamp.end()); Target(); }
Thanks in advance



LinkBack URL
About LinkBacks


