摘要: char str1[] = "abc";char str2[] = "abc";const char str3[] = "abc"; const char str4[] = "abc"; const char* str5 = "abc";const char* str6 = "abc";cout << boolalpha << ( str1==str2 ) << endl; // 输出什么?cout << boolalpha & 阅读全文
posted @ 2012-05-06 15:45 Yarkin 阅读(1033) 评论(0) 推荐(0) 编辑
摘要: 直接上代码float a = 1.0f;cout << (int)a << endl;cout << (int&)a << endl;cout << boolalpha << ( (int)a == (int&)a ) << endl; // 输出什么?float b = 0.0f;cout << (int)b << endl;cout << (int&)b << endl;cout << boolalpha << 阅读全文
posted @ 2012-05-06 15:26 Yarkin 阅读(436) 评论(0) 推荐(0) 编辑