polymorphism
Tiago Candeias
tcandeia@ualg.pt
Tue Jun 3 19:11:00 GMT 2003
Hi,
I am implementing a procedure to read objects in a format way, defining
the operator>> to do that.
ifstream is("CObjects.txt");
copy(istream_iterator<CObject>(is),istream_iterator<CObject>(),
inserter(list,list.begin()));
is.close();
If the object is a <int> there is no problem, but with other type like
<CObject>, then it doesn't work.
This is a polymorphic problem as described in (STL and OO Don't Easily
Mix) http://www.oonumerics.org/tmpw00/kuehl.html in 2000.
My question is if this problem is already resolved.
And in afirmative case, how to use it.
Thanks
More information about the Gcc-help
mailing list