What Does “Overloaded”/“Overload”/“Overloading” Mean?

前端 未结 8 1221
清歌不尽
清歌不尽 2020-12-09 10:33

What does \"Overloaded\"/\"Overload\" mean in regards to programming?

8条回答
  •  既然无缘
    2020-12-09 11:04

    A function is overloaded when it has more than one signature. This means that you can call it with different argument types. For instance, you may have a function for printing a variable on screen, and you can define it for different argument types:

    void print(int i);
    void print(char i);
    void print(UserDefinedType t);
    

    In this case, the function print() would have three overloads.

提交回复
热议问题