Good point! This worked:
Code:
string s;
s = point_type;
return s;
I have a separate toString function which does the following:
Code:
points.print();
string s;
return s;
This is calling a print() function which in turn calls the previous toString function. I've tried capturing the output but it doesn't work! Like this:
Code:
stringstream ss;
string s;
ss << points.print();
ss >> s;
return s;
This is the compiler error I receive:
Code:
In member function 'const std::string mazeRow::toString() const':
assign3.cpp:193: error: no match for 'operator<<' in 'ss << ((const mazeRow*)this)->mazeRow::points. bintree<dataType>::print [with dataType = mazePoint]()'
Is there any way around this?