检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
机构地区:[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.
分 类 号:TP311.52[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:3.148.165.9