【发布时间】:2015-01-25 05:05:02
【问题描述】:
我有两个变量:
int a;
uint b;
我还有一个数组:
float c[100];
如果我想传递a+b 作为数组c 的索引,这样:
c[a+b] = 10.0;
为了安全起见,我们应该确保a+b 返回uint。它是否返回unit?
我应该强制它的返回值为uint吗?
【问题讨论】:
-
什么是
uint? C中没有这样的标准类型。它是unsigned int的typedef吗?