#include"windows.h"
#include
srand( (unsigned)time( NULL ) );
cout=rand()%cout;
但是报错
gobanggame.obj : error LNK2019: unresolved external symbol _time referenced in function "public: struct tagPOINT __thiscall gobanggame::BestValue(void)" (?BestValue@gobanggame@@QAE?AUtagPOINT@@XZ)
emulatorDbg/gobang.exe : fatal error LNK1120: 1 unresolved externals
请知道的帮忙解决谢谢
在MSND上查:srand。
int n;
srand(GetTickCount());
n=rand()%5;
我想产生0到4的随机数,就加了个%5,不知道对不对,哈哈哈