Question: Trying to read a text file with values but I don't think this part of my code is working properly. Can someone please take a

Trying to read a text file with values but I don't think this part of my code is working properly. Can someone please take a look?

void ReadPoints2() { std::string input_line; std::getline(std::cin, input_line); std::stringstream input_stream(input_line); if (input_line.empty()) return; // Read size of sequence (an integer). int size_of_sequence; input_stream >> size_of_sequence; // Allocate space for "sequence" & sequence_ ptr points to dynamic array of type std::array size_ = size_of_sequence; sequence_ = new std::array[size_of_sequence]; // reads the rest of the input line the user entered Object token; for (int i = 0 ; input_stream >> token; ++i) { sequence_[i][0] = token; input_stream >> token; sequence_[i][1] = token; } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!