What does this line do?
back_insert_iterator< vector<T> > di(data[J]); // data iterator
data is declared as:
vector< vector<T> > data;
Thx
Printable View
What does this line do?
back_insert_iterator< vector<T> > di(data[J]); // data iterator
data is declared as:
vector< vector<T> > data;
Thx
back_insert_iterator is an stl iterator object that can be used to insert object to the back of an contianer.
The line creates an back insert iterator object called di, that has reference to an container (data[J], which is the vector J inside vector data). So when you set the values of di, it will end up on location data[j]. Did I make any sence?
Yes, it makes sense 85% .. :D thx for the reply..