String | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

String

If we have an array of size 5 and we have to input it in the given format Thomas 2000 Max 2100 Harry 2001 Etc How will we do this?

17th Jan 2019, 8:01 PM
Utkarsh
2 Answers
0
Nested vector or maps
17th Jan 2019, 9:34 PM
Elva
Elva - avatar
0
If you already know how many elements array will have I suggest you to use static arrays since they are more simple than dynamic ones. I will post code you need in few moments Edit: here you go https://code.sololearn.com/c30RCN1nDMB0/?ref=app
17th Jan 2019, 9:53 PM
Edin Hajdarevic
Edin Hajdarevic - avatar