MFC取随机数

来源:互联网 发布:淘宝卖的猛犸象牙真伪 编辑:程序博客网 时间:2024/06/06 20:57
    srand((unsigned)time(NULL));    for (int i = 0; i < 10; i++)    {        int  x = 86 + rand() % (106 - 76 + 1);        int  y = 307 + rand() % (373 - 307 + 1);        AtlTrace("%d %d \r\n", x, y);    }
原创粉丝点击