求一程序动画
http://www.dbeit.com/phpwind/data/groupdb/vc.JPG就从这里开始如何一步步做出注册机~
以下是代码,对高手来说算是简单的吧~
#include "iostream.h"
#include "stdio.h"
#include "windows.h"
void main()
{
char name;
int mul=0,sum=0,len=0;
byte n; //Chinese
cout<<"Please Input Your Name:\n";
cin>>name;
len = strlen(name);
if(len>=6)
{
for(int i=0;i<6;i++)
{
n = name;
mul=n*2;
sum+=mul;
}
cout<<"Your Serial is:\n"<<sum+len*2<<endl;
getchar();
}
else
cout<<"your name must be at least 6 chars long !\n";
}
生成好像这样子的窗口界面就OK了~
http://www.dbeit.com/phpwind/data/groupdb/key.GIF
动画要详细啊,不然看不懂的~
:handshake 我写的这段不是MFC代码,祢需要选择 倒数第3项 才能编译成功!
偷问一句:“曾经学过VC++?” 没学过,想学vc++,有本书在看~~~
页:
[1]