C码是多少?我被弄糊涂了size_t在C中,我知道它是由sizeof接线员。但到底是什么?是数据类型吗?假设我有一个for循环:for(i = 0; i < some_size; i++)我应该用int i;或size_t i;?
3 回答
慕田峪4524236
TA贡献1875条经验 获得超5个赞
size_t
strlen()
size_t
size_t
size_t
size_t s1 = strlen(str1);size_t s2 = strlen(str2);
str2
str1
int diff = s2 - s1; /* bad */
diff
s2 < s1
int
long long
s1
s2
.
size_t
fgets
size_t
int
.
浮云间
TA贡献1829条经验 获得超4个赞
size_t
unsigned char
unsigned short
unsigned int
unsigned long
unsigned long long
size_t
stddef.h
typedef unsigned long size_t;
- 3 回答
- 0 关注
- 694 浏览
添加回答
举报
0/150
提交
取消