无符号整形(unsigned) 和 有符号整形(int) 的比较会默认强制转换为 无符号类型(unsigned)
- 先来看示例代码,这里以 int a = -1 和 unsigned int b = 77 来做大小比较:
#include <iostream>
using namespace std;
int main()
{
int a = -1;
unsigned int b = 77;
if (a > b) //a > b = true
cout << "a > b" << endl;
else
cout << "a < b" << endl;
cout << " a = " << a << endl;
cout << " b = " << b << endl;
}
- 运行结果
- 如下图,a = -1,b = 77,但比较结果却是a > b, 即-1 > 77
- 原因正是两者类型不同导致的,这如果在实际项目中遇到了,在debug的时候真的感觉是见鬼了。
medicine in mexico pharmacies: mexico drug stores pharmacies – buying prescription drugs in mexico online
pharmacies in mexico that ship to usa: mexican online pharmacies prescription drugs – mexican pharmaceuticals online
mexican pharmaceuticals online mexican rx online buying prescription drugs in mexico online
mexico drug stores pharmacies: medicine in mexico pharmacies – mexican mail order pharmacies
buying from online mexican pharmacy pharmacies in mexico that ship to usa mexico drug stores pharmacies
mexican drugstore online: medicine in mexico pharmacies – mexican border pharmacies shipping to usa
buying prescription drugs in mexico online: medicine in mexico pharmacies – medicine in mexico pharmacies
mexican border pharmacies shipping to usa: buying prescription drugs in mexico – mexican pharmaceuticals online
mexican border pharmacies shipping to usa: best online pharmacies in mexico – buying from online mexican pharmacy
buying from online mexican pharmacy mexican pharmaceuticals online reputable mexican pharmacies online
mexican online pharmacies prescription drugs: pharmacies in mexico that ship to usa – buying prescription drugs in mexico online
purple pharmacy mexico price list: medicine in mexico pharmacies – medicine in mexico pharmacies
best online pharmacies in mexico: mexican drugstore online – medicine in mexico pharmacies
mexican pharmaceuticals online: buying prescription drugs in mexico online – п»їbest mexican online pharmacies
mexican rx online: mexican pharmaceuticals online – buying prescription drugs in mexico
buying prescription drugs in mexico online: mexican drugstore online – mexico drug stores pharmacies
reputable mexican pharmacies online п»їbest mexican online pharmacies mexican online pharmacies prescription drugs
mexican mail order pharmacies: buying prescription drugs in mexico – purple pharmacy mexico price list
best online pharmacies in mexico п»їbest mexican online pharmacies buying from online mexican pharmacy
mexican online pharmacies prescription drugs: buying prescription drugs in mexico – mexico drug stores pharmacies
mexico drug stores pharmacies: buying from online mexican pharmacy – buying from online mexican pharmacy
medication from mexico pharmacy: reputable mexican pharmacies online – mexican pharmaceuticals online
mexican border pharmacies shipping to usa: mexican online pharmacies prescription drugs – reputable mexican pharmacies online
mexico drug stores pharmacies: п»їbest mexican online pharmacies – buying prescription drugs in mexico online
mexico drug stores pharmacies buying from online mexican pharmacy mexican pharmacy
best online pharmacies in mexico: reputable mexican pharmacies online – mexico drug stores pharmacies
mexican drugstore online mexico pharmacy medicine in mexico pharmacies
buying prescription drugs in mexico online: medicine in mexico pharmacies – buying prescription drugs in mexico online
buying from online mexican pharmacy: mexican drugstore online – medication from mexico pharmacy
mexico drug stores pharmacies: buying prescription drugs in mexico online – mexican border pharmacies shipping to usa
mexican mail order pharmacies: mexico drug stores pharmacies – mexico drug stores pharmacies
mexico drug stores pharmacies purple pharmacy mexico price list mexican pharmacy
pharmacies in mexico that ship to usa: п»їbest mexican online pharmacies – mexican border pharmacies shipping to usa
mexico pharmacies prescription drugs: reputable mexican pharmacies online – mexico drug stores pharmacies
medication from mexico pharmacy: medication from mexico pharmacy – mexico drug stores pharmacies
pharmacies in mexico that ship to usa: purple pharmacy mexico price list – buying prescription drugs in mexico
buying prescription drugs in mexico online: mexican pharmaceuticals online – best online pharmacies in mexico
mexico drug stores pharmacies: mexico drug stores pharmacies – mexican drugstore online
reputable mexican pharmacies online mexican border pharmacies shipping to usa buying prescription drugs in mexico
mexican pharmaceuticals online: mexican mail order pharmacies – medication from mexico pharmacy
buying prescription drugs in mexico medication from mexico pharmacy pharmacies in mexico that ship to usa
mexico drug stores pharmacies: purple pharmacy mexico price list – mexican online pharmacies prescription drugs
best online pharmacies in mexico: mexico drug stores pharmacies – medicine in mexico pharmacies
mexican online pharmacies prescription drugs: purple pharmacy mexico price list – mexico drug stores pharmacies
medicine in mexico pharmacies: п»їbest mexican online pharmacies – buying prescription drugs in mexico
mexican online pharmacies prescription drugs: mexico pharmacies prescription drugs – mexico drug stores pharmacies
mexico pharmacies prescription drugs mexico pharmacies prescription drugs mexico pharmacy
purple pharmacy mexico price list: medication from mexico pharmacy – mexican mail order pharmacies
buying prescription drugs in mexico online: mexican border pharmacies shipping to usa – mexican drugstore online
п»їbest mexican online pharmacies: best online pharmacies in mexico – mexico drug stores pharmacies