error: ‘rand’ was not declared in this scope
int random=rand()%100;
解决:
加 #include <stdlib.h>
//随机数种子
srand((unsigned int)time(NULL));
//随机数产生(0~99)
int random=rand()%100;
error: ‘rand’ was not declared in this scope
int random=rand()%100;
解决:
加 #include <stdlib.h>
//随机数种子
srand((unsigned int)time(NULL));
//随机数产生(0~99)
int random=rand()%100;