Hello,
I am having a very strange problem where some custom c++ classes have started to throw up problems (where they worked absolutely fine and as expected for the past 3 years).
Within the class in question, I define in the header file both 1D and 2D vectors of strings as:
typedef std::vector<std::string> stringVector;
typedef std::vector<std::vector<std::string> > stringMatrix;
I am trying to read data from a text file using these objects. I am attempting to use them in the following way:
stringMatrix m;
stringVector s;
// Initialise s
m.push_back(s);
This gives me the following error:
Error: Can’t call vector<vector<string,allocator >,allocator<vector<string,allocator > > >::push_back(mDataLine)
Where mDataLine is of type stringVector
I am extremely puzzled as to why this error is being shown to me now, after seemingly working with no problems whatsoever for 3 years since I first wrote the class. In fact I had not edited the header or definition files for over a year, but apparently now through some black magic it does not work.
I am assuming perhaps something has become corrupted somewhere in the cstdlib? This class still seems to work on a different machine using the same ROOT version (5.34/32).
I attempted to rebuild root but this has not solved the problem. Any suggestions?
Thanks