3 ms·
Does C++ have late binding? For example, in the Obj-C Cocoa framework, a menu item can determine, at run time, whether the current control can respond to it, an
by pedrow 12y ago
Does C++ have late binding? For example, in the Obj-C Cocoa framework, a menu item can determine, at run time, whether the current control can respond to it, and enable/disable itself appropriately. Say if a button had the focus, the Paste menu would be dimmed because you can't paste a button.
- pjmlp 12y agoThat is not late binding by CS speak. Late binding is deciding at runtime the real implementation of a method to be called, which in C++ is done at via virtual method calls. What you are describing is actually an example dynamic types and reflection. In C++'s case, there are plenty of reflection libraries to choose from.