M
makc
This probably sounds dumb but i can't figure it out. I want a class
template that contains a 1000 of funcs that are same for all template
arguments, and 1 func that is different in every case. I tried:
template <class T, int i>
struct TFunc {
int Func (void);
};
int TFunc<char, 5> (void) {
return 0;
};
int main(int argc, char* argv[])
{
TFunc<char, 5> t;
return t.Func();
}
but compiler sends me back to school with this. Please suggest a
workaround?
template that contains a 1000 of funcs that are same for all template
arguments, and 1 func that is different in every case. I tried:
template <class T, int i>
struct TFunc {
int Func (void);
};
int TFunc<char, 5> (void) {
return 0;
};
int main(int argc, char* argv[])
{
TFunc<char, 5> t;
return t.Func();
}
but compiler sends me back to school with this. Please suggest a
workaround?