摘要:
#include "stdafx.h"
#include using namespace std; void func(char str[100])
{ cout<<sizeof(str)<<endl;
} int main()
{ char str[100]; func(str); //str传入函数做参数,做sizeof运算时被当做指针 返回4 ... 阅读全文
posted @ 2015-04-08 22:19
WQZ321123
阅读(226)
评论(0)
推荐(0)
摘要:
#include "stdafx.h"
#include using namespace std; int main()
{ int a[100]={0}; cout<<sizeof(a)/sizeof(a[0])<<endl; return 0;
} 运行结果: 阅读全文
posted @ 2015-04-08 21:12
WQZ321123
阅读(338)
评论(0)
推荐(0)
摘要:
异或操作不是将两个数相加,所以不用担心会出现越界的问题 阅读全文
posted @ 2015-04-08 19:18
WQZ321123
阅读(207)
评论(0)
推荐(0)

浙公网安备 33010602011771号