CString str;
str.Format("C++ bool: size=%d,false=%x,true=%x",sizeof(bool),false,true);
AfxMessageBox(str);
str.Format("VC BOOL: size=%d,FALSE=%x,TRUE=%x",sizeof(BOOL),FALSE,TRUE);
AfxMessageBox(str);
str.Format("VARIANT(VT_BOOL): size=%d,VARIANT_FALSE=%x,VARIANT_TRUE=%x",
sizeof(VARIANT_FALSE),VARIANT_FALSE,VARIANT_TRUE);
AfxMessageBox(str);
结论:
| 类型 |
字节长度 |
假 |
真 |
| bool |
1- char |
0 |
1 |
| BOOL |
4- int |
0 |
1 |
| VT_BOOL |
2- short int |
0 |
-1 |
posted on 2004-05-25 21:37 杨老师的茅屋 阅读(2336)
评论(0) 编辑 收藏