0

Problem with vector arrays in c++

How do i find a certain given index in an array and then at that index go to a sub array and print the value of the element present at the second index given for the sub array? (vector arrays) Update: I have an initial array of 2 elements 0 and 1 0 has further array associated 3 elements 4,5,6 1 has another array with 5 elements 5,6,8,9,3 I generate a query to search for an index such I can print this value at the given query index

18th Dec 2017, 9:05 PM
Anany Sharma
Anany Sharma - avatar
2 Réponses
0
Mmm can you explain better or show your question with a code example?
19th Dec 2017, 3:42 AM
Iago
Iago - avatar
0
Is this what you mean? 1 2 3 4 3 6 2 1 1 // Myvec. Search for 2. 1 '2' 3 4 3 6 2 1 1. // At 1. Sub Vector - 3 4 3 6 2 1 1 Researching for 2 in sub vector: 3 4 3 6 '2' 1 1 // At 4 in subvector, 6 in main vector If yes, Ill give you the code, though you just need to iterate over using find().
19th Dec 2017, 3:58 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar