64,670
社区成员
发帖
与我相关
我的任务
分享
#include <vector>
using namespace std;
typedef void * Handle;
template < class T > class MyClass {
public:
typedef void (*Handle) (T);
static vector < Handle > v;
static void Reg(Handle h) {
v.push_back(h);
};
static void Run(T t) {
vector < Handle >::iterator it = v.begin(); // 报错 expected `;' before "it"
};
};
void main()
{
MyClass<int>* m = new MyClass<int>();
}
#include <vector>
using namespace std;
typedef void * Handle;
template < class T > class MyClass {
public:
typedef void (*Handle) (T);
static vector < Handle > v;
static void Reg(Handle h) {
v.push_back(h);
};
static void Run(T t) {
typename vector < Handle >::iterator it = v.begin(); // 报错 expected `;' before "it"
};
};