C++中函数重载的实现
Function Overloading Implementation in C++
摘要:
本文详细阐述了面向对象程序设计中的函数重载及其在C++中的实现。该语言支持多种编程风格。在这里,我们简单地描述多态性及其类型。重点讨论了函数重载在该语言中的实现方式。语言的多态性具有这样的优点,即我们可以添加新代码而无需更改其他类,并且接口(在Java语言中)很容易实现。在这种技术中,运行时开销也被引入到动态绑定中,这增加了软件的执行时间。但是在这种静态类型的多态性中没有这种类型的开销,因为所有的事情都在编译时解决。多态;函数重载;静态多态;重载;编译时多态。
英文摘要:
In this article the function overloading in object-oriented programming is elaborated and how they are implemented in C++. The language supports a variety of programming styles. Here we are describing the polymorphism and its types in brief. The main stress is given on the function overloading implementation styles in the language. The polymorphic nature of languages has advantages like that we can add new code without requiring changes to the other classes and interfaces (in Java language) are easily implemented. In this technique, the run-time overhead is also introduced in dynamic binding which increases the execution time of the software. But there are no such types of overheads in this static type of polymorphism because everything is resolved at the time of compile time. Polymorphism; Function Overloading; Static Polymorphism; Overloading; Compile Time Polymorphism.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。