Open study

is now brainly

With Brainly you can:

  • Get homework help from millions of students and moderators
  • Learn how to solve problems with step-by-step explanations
  • Share your knowledge and earn points by helping other students
  • Learn anywhere, anytime with the Brainly app!

A community for students.

You can use the "find()" function to find if a value exists inside of a vector as such: (find(vector.begin(), vector.end(), alueToBeFound) != vector.end()); My question is, how do you perform this search in a two-dimensional vector but only on one of the dimensions? For instance, if I had "vector< vector >" such that vector[i][j] existed how could I only search through the 'i' values and not the j's? I'm wanting to store page reference strings in one of the columns and a timestamp in the other. However, when searching for a value I only want to check the page references not the t

Computer Science
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Join Brainly to access

this expert answer

SEE EXPERT ANSWER

To see the expert answer you'll need to create a free account at Brainly

To solve for only 1 of the variables do a for loop. for(int k = 0; k < i; k++) { //do something vector[k][j] or change k's to i's. }
This is what I ended up doing (already finished). However, after spending 5 hours finally getting all of my extremely inefficient code (so many loops..) to work, I realized I could have just created a class structure and been done in 20 minutes. FML.

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

Not the answer you are looking for?

Search for more explanations.

Ask your own question