How to implement the two dynamic in C++ language features
How to implement the two dynamic in C++ language features (as far as
possible use of the existing C++ features, and can be appropriate to
rewrite the compiler) :
According to the name of the class a object to obtain it, and what inherit
from class.
Dynamic class function call, the function without explicit declaration in
the header file.
Such as allowing the following code execution.
//A.h :
class A {};
// A.cpp
A::UnDeclaredFunctionB () {}
//main.cpp
void main () {
A *a = new A ();
a - > UnDeclaredFunction ();
Delete a;
}
No comments:
Post a Comment