In Visual Studio 6.0 everything in fine but in VS.NET 2003 compiling fails with error:
error C2664: 'CDialogSelectForm::GetTableName' : cannot convert parameter 1 from 'std::vector<_Ty>::const_iterator' to 'const CForm *'
with
[
_Ty=CForm
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
I think there is some more strict typecast policy in VS.NET rather than VS6...
Help please, i'm totally stuck.
It is because iterators are classes themselves, not just pointers. You need to first dereference the iterator, and then get the address of the CForm object: