How to fix the error C2893 complile with VC++6.0?

L

Long March

hi all,
How to fix the error C2893 complile with VC++6.0?
Thank you.

Code below:

#include <iostream>

using namespace std;

class Compare
{
public:
template <class UserType>
UserType max(UserType na, UserType nb);
template <class UserType>
UserType min(UserType na, UserType nb);
};

template <class UserType>
UserType Compare::max(UserType na, UserType nb)
{
return (na > nb) ? na : nb;
}

template <class UserType>
UserType Compare::min(UserType na, UserType nb)
{
return (na < nb) ? na : nb;
}
int main()
{
Compare a;
a.min(343,33);
return 1;
}
 

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,013
Latest member
KatriceSwa

Latest Threads

Top