C++ Static Virtual Function
You can specify that the compiler match a function call with the correct function definition at run time. 第 1 个答案 这是一个关于指针的概要static_castdynamic_cast特别是它们与指针有关的内容这只是一个101级的纲要并没有涵盖所有的错综复杂 static_cast 类型 ptr. C Virtual Functions C doesnt have pointers-to-class so there is no scenario in which you could invoke a static function virtually. . You can declare a virtual function to be a friend of another class. Would work the same and an extra rule could be added so that obj-my_static_function. Virtual functions make code easier for programmers to reuse but also make it harder for compilers to analyze. Static functions arent tied to the instance of a class but they are tied to the class. Maybe there are reasons why static virtuals should not be allowed. Class B. By default C matches a function call with the correct function definition at compile time. We investi-gate the ability of three static analysis algorithms...