请教各位C语言高手,小弟在用VC++6.0编C语言程序时用到了stdlib.h头文件中的函数randomize()和random(),可是VC不认识,总是报错,我在WIN-TC中编译过了,能通过,请问是什么问题,如果不能调用的话,那么在VC中编辑C程序如何表示随机数生成函数呢?先谢谢了!
下面是我的程序:
#include"stdio.h"
#include"stdlib.h"
#include"ctype.h"
void main()
{
int count,
number,
guess;
char yes='Y';
printf("\nNow let us play the game.\n Guess the number:");
while(toupper(yes)=='Y')
{
count=0;
randomize();
number=random(100)+1;
do{
do{
printf("\nInput an integer number(1-100):");
scanf("%d",&guess);
}while(!(guess>=1&&guess<=100));
if(guess<number)
printf("\nYour answer is LOW,try again.");
if(guess>number)
printf("\nYour answer is HIGH,try again.");
count++;
if(count==15)
{
printf("\nThis is the %d times!Think it hard next!");
exit(0);
}
}while(!(guess==number));
if(count<=7)
{
printf("\n You got it in &d times.\n",count);
printf("\n Congretulations!");
}
else
{
printf("\nYou got it in %d times.\n",count);
printf("\nI bet you can do it better");
}
printf("\n NEXT?(Y/N):");
scanf("%c",&yes);
}
}
求助 关于库函数stdlib.h