
Returning user defined data types
Quote:
> Unfortunately I can't instantiate these objects. A
> statement like
> CCBiasedNeuronCtl *tmp = new CCBiasedNeuronCtl()
> gives the following compiler error (v++.net):
d:\users\matthias\projekte\wnetapps\ctlWaveletNet\WaveletNetCtl.cpp(37):
Quote:
> error C2259: 'CCBiasedNeuronCtl' : cannot instantiate abstract class
> due to following members:
You need to wrap your class in an ATL-provided class that implements
IUnknown methods. E.g.
CComObject<CCBiasedNeuronCtl>* pObject;
CComObject<CCBiasedNeuronCtl>::CreateInstance(&pObject);
// Now pObject points to your instance with refcount of 0
--
With best wishes,
Igor Tandetnik
"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken