I have three classes.
Trial is holding a pointer to a WriteToFile object and for a Robot object.
Trial is calling Robot method to return a string and passes it to his WriteToFile.
Robot is containing a private
I initialized it using
And the return method
Inside this method I can see that samplesRobotToKalmanFilter is empty
const vector<int>& Robot::GetSamplesReadUsingRobot() const
cout<<"empty\n"; //INDEED EMPTY
WriteToFile has the following method
I call this last method from Trial instance:
void WriteToExternalFile::WriteValuesToVector(const vector<int>& samplesvec, const vector<double>& valuesXY)
cout<<"empty\n"; //NOT SHOWING EMPTY
writeinput->WriteValuesToVector(robot->GetSamplesReadUsingRobot() , robot->GetinputForKalmanFilter());
The problem: inside this last method samplesvec is no longer considered empty...