好长时间没写C,以往的小警告处理,这次年前复习都会记下来。
关于随机数
a[i] = arc4random() % (b - a + 1) + a;
目前用的是Xcode8.0,系统默认创建的是
#include <stdio.h>
若想使用上面那行随机数,需手动添加个头文件
#include <stdlib.h>
最好不要更改stdio.h为stdlib.h,因为printf函数只在原头文件库中有声明。
原文:http://www.cnblogs.com/everimprovement/p/6241198.html