>invalid conversion from ‘const char*’ to ‘int’
Yep, that's what should happen. You say that Set should take a parameter of type T, where T is specified by the template class. If you pass a value that doesn't match the type of the template class and isn't compatible, you'll get an error just as readily as if you did this:
int main()
{
int foo = "boo";
}
>where they used vectors and iterators with none of the problems of this
They probably weren't doing the same thing. Why don't you post the code you're trying to emulate and we can tell you where you got it wrong.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401