P
PengYu.UT
I can't figure out what is wrong with following program. Would you
please help me? The error line is marked with error.
Peng
#include <iostream>
template <typename T>
class B{
public:
T t;
};
class A{
public:
template <typename T>
void doit(typename B<T> &b){//error
std::cout << "in " << std::endl;
}
};
int main(int argc, char *argv[])
{
B<int> b;
A a;
a.doit<int>(b);
}
please help me? The error line is marked with error.
Peng
#include <iostream>
template <typename T>
class B{
public:
T t;
};
class A{
public:
template <typename T>
void doit(typename B<T> &b){//error
std::cout << "in " << std::endl;
}
};
int main(int argc, char *argv[])
{
B<int> b;
A a;
a.doit<int>(b);
}