节点文献

准确使用C/C++中等于运算符的研究

Study on Reducing Use Errors of Equality Operator in C/C++ Programming

  • 推荐 CAJ下载
  • PDF下载
  • 不支持迅雷等下载工具,请取消加速工具后下载。

【作者】 张合花张全法齐永奇

【Author】 ZHANG He-hua;ZHANG Quan-fa;QI Yong-qi;School of Physics and Engineering,Zhengzhou University;North China University of Water Resources and Electric Power;

【机构】 郑州大学物理工程学院华北水利水电大学机械学院

【摘要】 本文讨论C/C++程序设计中等于运算符的两种常见使用错误,即与赋值运算符混淆和用来判别两个浮点数是否相等。从程序员的角度给出了减少与赋值运算符混淆,以及不同情况下正确判别两个浮点数是否相等的方法。并利用VC 6.0设计了一个Add-in程序,能够自动发现有可能出现这两种错误的语句,提醒程序员注意,以便从集成开发环境的角度减少错误。

【Abstract】 Two kinds of common use errors of equality operator in C/C + + programming are discussed,one is to confuse with assignment operator and the other is to determine whether two floating point numbers are equal. For the programmers,some methods to reduce confusion with assignment operator and determine whether two floating point numbers are equal under different conditions are given. An Add- in is developed with VC 6. 0 to find where maybe appear these kinds of errors and to notify the programmer to examine his program,thus to reduce the probability of errors from the perspective of the integrated development environment.

【关键词】 C/C++程序设计等于运算符Add-in
【Key words】 C/C++ programmingequality operatorAdd-in
  • 【文献出处】 中州大学学报 ,Journal of Zhongzhou University , 编辑部邮箱 ,2016年02期
  • 【分类号】TP312.1
  • 【被引频次】1
  • 【下载频次】30
节点文献中: 

本文链接的文献网络图示:

本文的引文网络