template trouble

G

Gernot Frisch

template <class T> void SetAry(CComSafeArray< T >*& pSar, int num, T*
pData)
{}

CComSafeArray<REAL> *pSs;
REAL* Ss;
SetAry(pSs, 6, Ss);

Gives error:

C2784: 'void SetAry(ATL::CComSafeArray<T> *& ,int,T *)': template
argument for 'ATL::CComSafeArray<T> *& ' of 'ATL::CComSafeArray<T> *'
could not be derived
with
[
T=REAL
]
See declaration of 'SetAry'

Does anyone "understand" the error? If so, is there a solutiuon?


--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}

________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

template of class function? 5
a thread safe stack? 7
int(a) vs (int)a 19
reference to array? 13
queue where I can delete in the middle? 3
a[3} slower than a.x; a.z; a.z 27
operator overloading... 5
&X == &X.member ? 1

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,665
Latest member
salkete

Latest Threads

Top