vc中关于随机数的有关问题

vc中关于随机数的问题
vc中可以用哪个函数来产生随机数啊?


------解决方案--------------------
#include <stdlib.h>
#include <stdio.h>
#include <time.h>

void main( void )
{
int i;

/* Seed the random-number generator with current time so that
* the numbers will be different every time we run.
*/
srand( (unsigned)time( NULL ) );

/* Display 10 numbers. */
for( i = 0; i < 10;i++ )
printf( " %6d\n ", rand() );
}

------解决方案--------------------
还是srand 和rand配合
只要把头文件包含进去就可以
------解决方案--------------------
一样的
rand()
------解决方案--------------------
我建的是MFC的单文档程序。 和这个没有关系的,把头文件包进来就可以了