Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I am trying to work with a vector, and I need to store the elements of the LHS of an object into an vector

Hello, I am trying to work with a vector, and I need to store the elements of the LHS of an object into an vector and print out the values of the vector.

I am new to working with STD and vectors + itterators and I know that I have an error in this segment of code I am getting the error msg:

:14: error: no match for 'operator<<' (operand types are 'std::ostream {aka std::basic_ostream}' and 'std::vector') std::cout< 

//store contents of json object in a vector:

std::vector nums;

std::vector::iterator data;

std::vector::iterator itr;

for(std::vector::iterator itr = keys.begin(); itr != keys.end(); ++itr) {

std::vector data = jsonObject[*itr].get>();

std::cout<

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

IBM Db2 11 1 Certification Guide Explore Techniques To Master Database Programming And Administration Tasks In IBM Db2

Authors: Mohankumar Saraswatipura ,Robert Collins

1st Edition

1788626915, 978-1788626910

More Books

Students also viewed these Databases questions

Question

Define the operating cycle.

Answered: 1 week ago

Question

How do you store and read objects from a file?

Answered: 1 week ago

Question

Design selection interview for the post of software engineer.

Answered: 1 week ago

Question

What is the preferred personality?

Answered: 1 week ago

Question

What is the relationship between humans?

Answered: 1 week ago