#using<System.dll>
usingnamespace System;
usingnamespace System::Diagnostics;
refclass B {
public:
virtual void F() {
Console::WriteLine("B::F");
}
};
refclass D : B {
public:
virtual void F() override {
Console::WriteLine("D::F");
}
};
int main(){
B^ b = gcnew D;
b-F();
}
It says identifer not found.
I dont know why it thinks that , Probaly a simple mistake any ones see anything?
------ Build started: Project: c++ test, Configuration: Debug Win32 ------
Compiling...
test2.cpp
.\test2.cpp(22) : error C2143: syntax error : missing ';' before '-'
.\test2.cpp(22) : error C3861: 'F': identifier not found
Build log was saved at "file://c:\Documents and Settings\kcd\My Documents\Visual Studio 2005\Projects\c++ test\c++ test\Debug\BuildLog.htm"
c++ test - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========