vector of list in c++ | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

vector of list in c++

Hello, I got something like that vector<list<string>> how to add a string to a first list in side first vector container.

21st Mar 2018, 1:09 PM
mercin
mercin - avatar
1 Antwort
+ 3
vec[0].push_front(str) or vec[0].push_back(str) the first adds string to the beginning of the list, the second to its end
21st Mar 2018, 1:52 PM
michal