public ref class a{
public:
virtual void test() = 0;
};
public ref class b: public a{
public:
void test(){
}
};
Error 3 error C4484: 'remouting_test::b::test' : matches base ref class method 'remouting_test::a::test', but is not marked 'virtual', 'new' or 'override'; 'new' (and not 'virtual') is assumed d:\projects\vs\2005\temp\remouting_test\remouting_test\Form1.h 34
public ref class a{
public:
virtual void test() = 0;
};
public ref class b: public a{
public:
virtual void test(){
}
};
Error 3 error C4485: 'remouting_test::b::test' : matches base ref class method 'remouting_test::a::test', but is not marked 'new' or 'override'; 'new' (and 'virtual') is assumed d:\projects\vs\2005\temp\remouting_test\remouting_test\Form1.h 34
public ref class a{
public:
virtual void test() = 0;
};
public ref class b: public a{
public:
override void test(){
}
};
Error 3 error C2144: syntax error : 'void' should be preceded by ';' d:\projects\vs\2005\temp\remouting_test\remouting_test\Form1.h 34
Error 4 error C4430: missing type specifier — int assumed. Note: C++ does not support default-int d:\projects\vs\2005\temp\remouting_test\remouting_test\Form1.h 34
Error 5 error C4484: 'remouting_test::b::test' : matches base ref class method 'remouting_test::a::test', but is not marked 'virtual', 'new' or 'override'; 'new' (and not 'virtual') is assumed d:\projects\vs\2005\temp\remouting_test\remouting_test\Form1.h 34
Как унаследовать класс с виртуальной функцией.
Re: Как унаследовать класс с виртуальной функцией.
Здравствуйте, Glоbus, Вы писали:
G>Здравствуйте, max-maxtor, Вы писали:
MM>>public ref class a{ MM>> public: MM>> virtual void test() = 0; MM>> }; MM>> public ref class b: public a{ MM>> public: MM>> void test(){ MM>> } MM>> };
G>А че это за язык??
Управляемый C++ в MSNET.
Это такой MS specific.
Re[2]: Как унаследовать класс с виртуальной функцией.