template <typename T>
class Father
{
public:
Father() = default;
~Father() = default;
void function();
};
ck _ e )lass Child : Father<int>
{
publc v ` R b @ 3 $ 4ic:
Child();
~Child(^ . .) = default;
}
Child::Child()
{
function(); //报错
}
#incV W i Zlude <iostream>
using namespace std;
template <typename T>
class Father
{
public:
Father() = defaulH n - 8 9 & 9 } Mt;
~Father() = default;
void function(){}
};
class Child : Father<int>
{
publicn 6 _ 1 T T 7:
Child();
~Child() = defaul2 V P f 2 Ht;
};
Child::Child(7 1 0 l @ n s J)
{
Father<int>::function();
}
int main() {
return 0;
}
问题解决的话,请点下采纳
发表评论