首页 | 本学科首页   官方微博 | 高级检索  
     检索      

C++函数重载实现方法剖析
引用本文:张文博.C++函数重载实现方法剖析[J].宝鸡文理学院学报(自然科学版),2006,26(2):156-157.
作者姓名:张文博
作者单位:宝鸡文理学院,计算机科学系,陕西,宝鸡,721007
摘    要:目的剖析C 中重要语法函数重载的实现机制,应用获得的结果,分析C 和C语言中的相关语法特征。方法采用Visual C 为实验工具,利用编译器生成的COD文件,对源代码和相应的汇编代码进行比对、归纳,得出结论。结果获得了C 函数重载的实现方法的关键策略,获得了关键策略中的部分编码规则,解释了相关语法现象。结论改名策略是C 函数重载实现机制的关键,也是实现C 中类型安全的链接的特征的基础,可以利用该实现策略对C语言中函数的相关语法进行解释。

关 键 词:函数重载  名字冲突  改名
文章编号:1007-1261(2006)02-0156-02
收稿时间:2005-10-24
修稿时间:2006-02-28

Analysis of C++ function overload implementation
ZHANG Wen-bo.Analysis of C++ function overload implementation[J].Journal of Baoji College of Arts and Science(Natural Science Edition),2006,26(2):156-157.
Authors:ZHANG Wen-bo
Abstract:Aim To analyze implementation of function overload,one of important phrasing in C language,applying the result to carry on analysis to the related phrasing characteristic in the C language nd C language.Methods Adop Visual C compiler as experiment tool,make use of the COD file of the compiler creation,compare the source code with correspond of assembler code,by inductive reasoning,get conclusion.Results Acquired the key strategy of realization of the function overload in C language,acquired a part to code rule,explained related phrasing phenomenon.Conclusion Name mangling the strategy is the key of realization of the function overload,also is the foundation that carry out type-safety linking,can make use of that strategy to carry on explain to the related phrasing of the function in the C language.
Keywords:function overload  name conflict  name mangling  
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号