template function

M

Marc Schellens

When I feed this to my compiler (gcc 3.2) I got the following error
message. Whats wrong?
thanks,
marc

template <typename T>
typename T::ty AssureScalar( EnvT* e, size_t pIx)
{
typename T::ty scalar;
bool isScalar= e->Scalar( scalar);
return scalar;
}

void call( EnvT* e)
{
DString callP = AssureScalar<StringType>( (EnvT*) e, (size_t) 0);
}




basic_pro.cpp:141: no matching function for call to `AssureScalar(EnvT*,
size_t)'
 
V

Victor Bazarov

Marc Schellens said:
When I feed this to my compiler (gcc 3.2) I got the following error
message. Whats wrong?

When I feed this to my compiler (gcc 3.2) I get much more errors.
First of them is "EnvT undefined". Care to post complete code?
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top