无符号整形(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的时候真的感觉是见鬼了。
slot oyunlar?: slot siteleri – slot tr online
https://casinositeleri2025.pro/# oyun sitesi oyun sitesi oyun sitesi
semaglutide tablets price: semaglutide tablets price – rybelsus semaglutide tablets
https://kamagra.men/# super kamagra
erection pills online: buy ed medication – edmeds
https://cenforce.icu/# order cenforce
https://cenforce.icu/# cenforce for sale
cheap boner pills: erectile dysfunction pills for sale – order ed pills
https://cenforce.icu/# cheapest cenforce
cheap kamagra: super kamagra – Kamagra Oral Jelly
erectile dysfunction treatment: drugs1st – ed products
https://drugs1st.pro/# ed pills that work
http://edpills.men/# ed meds online
Kamagra 100mg: Kamagra 100mg – п»їkamagra
Kamagra tablets: Kamagra 100mg price – Kamagra tablets
http://cenforce.icu/# Cenforce 150 mg online
http://cenforce.icu/# Cenforce 100mg tablets for sale
buy ed pills online: ed treatment natural – ed in men
https://drugs1st.pro/# buy prescription drugs without doctor
https://drugs1st.pro/# ed dysfunction treatment
drugs1st: ed therapy – prescription drugs without doctor approval
https://drugs1st.pro/# non prescription ed drugs
pills for ed online: online erectile dysfunction prescription – cheap ed meds online
lisinopril 40 mg tablets: lisinopril pills 2.5 mg – lisinopril tablet 40 mg
https://ciprofloxacin.cheap/# cipro 500mg best prices
ciprofloxacin over the counter: ciprofloxacin generic – п»їcipro generic
https://clomid.store/# how to get clomid pills
order clomid get cheap clomid price buy clomid without rx
gluco6 reviews : https://gluco6reviews.usaloves.com/
where to buy generic clomid: order cheap clomid no prescription – clomid otc
ciprofloxacin generic: cipro – cipro for sale
https://clomid.store/# can you get cheap clomid without insurance
zithromax 500mg over the counter: where can i buy zithromax in canada – zithromax 250mg
zithromax 250 mg pill: zithromax antibiotic – generic zithromax medicine
https://lisinoprilus.com/# lisinopril buy online
can you get clomid no prescription: how can i get generic clomid for sale – order generic clomid pills
where to buy clomid without a prescription: cost generic clomid for sale – can i get cheap clomid no prescription
can you get clomid without dr prescription: can i buy clomid prices – how to buy cheap clomid without prescription
how to get generic clomid pill: buying clomid prices – where can i get clomid without prescription
http://cytotec.top/# buy cytotec
lisinopril 40 mg india: lisinopril tablet 40 mg – lisinopril coupon
https://clomid.store/# can i get generic clomid pills
zithromax 1000 mg pills: zithromax online paypal – zithromax online
zithromax 500mg price in india: zithromax drug – zithromax for sale us
https://ciprofloxacin.cheap/# buy cipro online without prescription
lisinopril 40mg: lisinopril brand name in usa – lisinopril cheap brand
ciprofloxacin 500 mg tablet price buy cipro cheap buy cipro online without prescription
http://azithromycinus.com/# buy cheap zithromax online
cipro ciprofloxacin: ciprofloxacin mail online – buy cipro online canada
https://lisinoprilus.com/# lisinopril 20 mg tablet price