如何使用MFC做一款小游戏教程
1、产生随机数一般可以用,#include <time.h>;srand((unsigned)time( NULL ));rand()
2、比如你可以规定(操作数A 运算符B 操作数C),某一次随机出来A=5 B为+ C为2,那么随机算式就是 5 + 2
3、代码如下:namespace Leimom.FiveChess{;using System;using System.Drawing;
4、using System.Collections;using System.ComponentModel;using System.WinForms;
5、using System.Data;////// Summary description for Form1.
6、///public class FiveForm : System.WinForms.Form{////// Required designer variable.
7、///private System.ComponentModel.Container components;private S烤恤鹇灭ystem.WinForms.ImageList imageListbw;
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:79
阅读量:40
阅读量:94
阅读量:82
阅读量:73