无符号整形(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的时候真的感觉是见鬼了。
average cost of lisinopril: 10 mg lisinopril cost – zestril 5 mg prices
https://cytotec.top/# Misoprostol 200 mg buy online
buy cipro cheap: purchase cipro – buy ciprofloxacin over the counter
http://azithromycinus.com/# zithromax for sale us
lisinopril 10 best price lisinopril 1.25 lisinopril 40 mg tablet
buy cytotec: п»їcytotec pills online – buy cytotec
https://clomid.store/# can i buy clomid without prescription
where buy generic clomid price where buy clomid without dr prescription where can i get generic clomid without prescription
zithromax 500 mg for sale: zithromax for sale us – zithromax capsules australia
can i order generic clomid pill: how to get generic clomid without a prescription – buy generic clomid pill
paxlovid covid: Paxlovid.ink – Paxlovid.ink
Amoxil Pharm Store: AmoxilPharm – Amoxil Pharm Store
https://ivermectinpharm.store/# Ivermectin Pharm
Buy compounded semaglutide online: cheap Rybelsus 14 mg – semaglutide pharm
http://semaglutidepharm.com/# cheap Rybelsus 14 mg
Paxlovid.ink: Paxlovid.ink – Paxlovid.ink
Paxlovid buy online: Paxlovid.ink – paxlovid generic
https://semaglutidepharm.com/# buy rybelsus
Ivermectin Pharm: buy stromectol uk – ivermectin cream
Paxlovid.ink: Paxlovid.ink – Paxlovid.ink
rybelsus price: buy rybelsus – rybelsus
https://paxlovid.ink/# buy paxlovid online
paxlovid pharmacy paxlovid for sale paxlovid covid
buy rybelsus: semaglutide pharm – buy rybelsus
Amoxil Pharm Store: Amoxil Pharm Store – Amoxil Pharm Store
https://gabapentinpharm.com/# buy neurontin online uk
generic neurontin pill: neurontin 300 mg tablets – Gabapentin Pharm
cheap Rybelsus 14 mg: Rybelsus 7mg – buy semaglutide online
https://ivermectinpharm.store/# Ivermectin Pharm Store
Ivermectin Pharm Store: Ivermectin Pharm – Ivermectin Pharm Store
rybelsus: rybelsus cost – rybelsus price
Semaglutide pharmacy price: Buy semaglutide pills – Buy semaglutide pills
https://ivermectinpharm.store/# Ivermectin Pharm Store
buy rybelsus: buy rybelsus – rybelsus price
cheap drugs http://indianpharmstar.com/# indianpharmacy com
indianpharmacy com: indian pharm star – best india pharmacy
medication from mexico pharmacy: Pharm Easy – medication from mexico pharmacy
best male enhancement pills http://mexicanpharmeasy.com/# buying prescription drugs in mexico
mail order pharmacy india: IndianPharmStar.com – buy medicines online in india
ed pumps: canadian pharm – medication online
canadian drug: canadianpharm1st.com – medications for
mexican border pharmacies shipping to usa: mexican pharm easy – medicine in mexico pharmacies
erection pills that work https://canadianpharm1st.com/# online canadian pharmacy
best online pharmacies in mexico: mexican pharm easy – mexico pharmacies prescription drugs
mexican pharmaceuticals online: mexican pharm easy – mexican rx online
ed cures that actually work http://mexicanpharmeasy.com/# mexican mail order pharmacies
top online pharmacy india: indian pharmacy – indian pharmacies safe
medication online: canada pharmacy online – ed treatment drugs
mexican drugstore online: Pharm Easy – mexican online pharmacies prescription drugs
cheap medication: canadianpharm1st.com – best natural ed treatment