求指教,求鞭笞,关于string::size_type;
int main(){string st("abcdefghijklmn");
if(st.size()==0)
.......
}
这是我在书上看到的一段,我很疑惑size()成员函数的返回值是string::size_type,这个应该是类类型,怎么和int的0进行比较呢。
求指教啊。。。。。


2013-01-14 10:34
2013-01-14 10:44
2013-01-14 10:46

2013-01-14 10:53
2013-01-14 10:57
程序代码:#include "afx.h"
typedef unsigned int wp231957;
int _tmain(int argc, _TCHAR* argv[])
{
wp231957 test;
test=123456;
printf("%d",test);
return 0;
}
2013-01-14 11:11

2013-01-14 11:20
2013-01-14 11:26
2013-01-14 12:17
2013-01-14 12:41