What is the difference between dynamic dispatch and late binding in C++?

后端 未结 11 1565
臣服心动
臣服心动 2020-12-07 10:52

I\'ve recently read about the Dynamic Dispatch on Wikipedia and couldn\'t understand the difference between dynamic dispatch and late binding in C++.

When each one

11条回答
  •  感动是毒
    2020-12-07 11:42

    Binding refers to the process of associating a name with an operation.

    the main thing here is function parameters these decides which function to call at runtime

    Dispatching refers to choosing an implementation for the operation after you have decided which operation a name refers to.

    dispatch control to that according to parameter match

    http://en.wikipedia.org/wiki/Dynamic_dispatch

    hope this help you

提交回复
热议问题