0
Vector to map?
Hello, I try to make a map from a vector but I don’t know how to do it good. I have a vector of strings and the map had to have the strings of the vector and it had to count the strings and to give it a key. F.e. Vector<string> words={ “hello”, “how” , “are”, “hello”} Output hello: 2 how: 1 are: 1 I tried something. https://code.sololearn.com/cLy2XJQr8Hzx/?ref=app
1 Resposta
0
~ swim ~ do you mean like this?
https://code.sololearn.com/cLy2XJQr8Hzx/?ref=app