分类:
2008-09-17 11:13:20
我定义了一个模板
template
struct Srep;
Srep *rep;
public:
String();
String(const C*);
String(const String&);
C read(int i) const;
};
template
C* s;//到元素的指针
int sz;//元素个数
int n;
};
template
{
rep=new Srep(0,C());//**************************error
}
int main()
{
String
return 0;
}
在标记的地方报如下错误
error C2514: 'String
E:\OpenCV_Test\childclass\childclass.cpp(6) : see declaration of 'Srep'
E:\OpenCV_Test\childclass\childclass.cpp(48) : while compiling class-template member function '__thiscall String
Error executing cl.exe.
望大侠们赐教
__________________
飘飘荡荡的尘埃