I am new to programming c++. I am trying to read 75 doubles that are inside of a string that I read from a file. I am trying to use istringstream.
This is what I have so far: Header File:
#ifndef READPOINTS_H_INCLUDE
#define READPOINTS_H_INCLUDE
#include <string>
#include <vector>
#include <fstream>
#include <sstream>
using namespace std::istringstream;
.....
istringstream linestr;
CPP FILE: #include
void ReadPoints::grabPoin(const string& read_line, vector<doubles> PointVector){
linestr(read_line);
for(int i = 0; i < 75; i++){
linestr >> value
pointVector.push_back(value);
}
}
When I compile this code I get the following error:
ReadPoints.cpp: In member function ‘bool ReadPoints::grabPoint(const string&, std::vector&)’: ReadPoints.cpp:48:19: error: no match for call to ‘(std::istringstream {aka std::basic_istringstream}) (const string&)’ linestr(read_line);
Can anyone explain what is wrong and why I am getting the no match for call?