This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

polymorphism


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]