准确使用C/C++中等于运算符的研究  被引量:1

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

在线阅读下载全文

作  者:张合花 张全法[1] 齐永奇[2] 

机构地区:[1]郑州大学物理工程学院,郑州450001 [2]华北水利水电大学机械学院,郑州450045

出  处:《中州大学学报》2016年第2期112-115,共4页Journal of Zhongzhou University

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

分 类 号:TP311.52[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象