摘要: ↑ The operand of sizeof can't be a C-style type cast: the expression sizeof (int) * p is unambiguously interpreted as (sizeof(int)) * p, but not sizeo 阅读全文
posted @ 2016-08-27 10:56 PhiliAI 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 1. 如何选择类型的准则 当明确知晓数值不可能为负的时候,应该选择无符号类型。 使用int执行整数运算的时候,在实际应用中,short常常显得太小而long一般和int有一样的尺寸,如果数值超过了int,那么就要用long long(ACM经常用)。 在算术表达的时候不要使用char或者bool,c 阅读全文
posted @ 2016-08-27 10:38 PhiliAI 阅读(498) 评论(0) 推荐(0) 编辑