template<class T> class Foo{ T tVar; public: Foo(T t) : tVar(t) { } }; template<class T> class FooDerived:public Foo<T> { }; int main() { FooDerived<int> d(5); return 0; }
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题