Couple questions on using STL's
1) I have a structure of vector
[Error: Irreparable invalid markup ('<vector<int>') in entry. Owner must fix manually. Raw contents below.]
1) I have a structure of vector<vector<int> >v , and I want to get the largest container size in there ... I am trying to use max_element() but not sure how to write the predicate in that case.
2) How to achieve something like this with STL (is there some STL functions for it at all ) ?
vector<int>a contains elements 2 1 5 0 8 I want to have all the non-0 indices stored in another vector, (e.g., this new vector will contains 0 1 2 4).
TIA
2) How to achieve something like this with STL (is there some STL functions for it at all ) ?
vector<int>a contains elements 2 1 5 0 8 I want to have all the non-0 indices stored in another vector, (e.g., this new vector will contains 0 1 2 4).
TIA
