我做过猜数字游戏,http://t.csdn.cn/BO0RY你可以参考一下。
找不到函数定义但是代码似乎没问题啊你#include <stdlib.h>试试呢
加上这个#include <time.h>
这个位置加上#include <stdlib.h>