07 2013 档案

摘要:#include using namespace std;#include #include class Li{public: int x; Li() { x=100; } void Ldfy()//Li地主赢 { x=x+6; } void Ldfs()//li地主输 { x=x-6; } void Lnfy()//Li农民赢 { x=x+3; } void Lnfs()//Li农民输 { x=x-3; } int Lr() { int lr=rand(); return lr; } void Lprint() { coutH&&L>C) { if(D>N1&am 阅读全文
posted @ 2013-07-15 21:13 army168 阅读(344) 评论(0) 推荐(0)
摘要:1struct{int x; int y;}test1;定义了结构体test1test1.x和test1.y可以在语句里用了。2struct test{int x;int y;}test1;定义了结构体test1test1.x和test1.y可以在语句里使用了。与1比,1省写了test3typedef struct test{int x;int y;}test1,test2;这结构体的(类型) 有两个名字test1,test2真正在语句里用,还要写:text1 test1;然后好用 test1.x test1.y或写 text2 test1;然后好用 test1.x test1.y 阅读全文
posted @ 2013-07-08 13:40 army168 阅读(292) 评论(0) 推荐(0)
摘要:定义宏 ILC_MASK0x0001 前面0x是十六制符号后面表示的是十六进制0001等于二进制0000 0000 0000 0001数学上用 hex 16进制 oct 8进制 dec十进制C++中输入输出的十六进制八进制1、数的进制默认进制:默认状态下,数据按十进制输入输出。如果要求按八进制或十六进制输入输出,在cin或cout中必须指明相应的数据形式,oct为八进制,hex为十六进制,dec为十进制。1 int i, j, k, l;2 cout>oct>>i; //输入为八进制数4 cin>>hex>>j; //输入为十六进制数5 cin> 阅读全文
posted @ 2013-07-08 11:52 army168 阅读(500) 评论(0) 推荐(0)
摘要:#include "iostream.h"//using namespace std;char up(char j){if(j>=97&&j>c;a[i]=c;}for(int h=0;h using namespace std;VC++6.0用这就这就可以了#include 阅读全文
posted @ 2013-07-06 23:10 army168 阅读(605) 评论(0) 推荐(0)