文档库 最新最全的文档下载
当前位置:文档库 › C++语言string类的实现(完整源代码)

C++语言string类的实现(完整源代码)

C++语言string类的实现(完整源代码)
C++语言string类的实现(完整源代码)

纯C语言写的一个小型游戏-源代码

纯C语言写的一个小型游戏-源代码

/* A simple game*/ /*CopyRight: Guanlin*/ #include #include #include #include #include #include struct object_fix { char name[20]; char id[5]; char desc[500]; char action[30]; char im[5]; }; struct object_move { char name[20]; char id[5]; char desc[500]; int loc; int pwr; int strg; char im[5]; }; struct rover { char name[20]; char id[5]; char desc[500]; int pwr; int strg; int location[2]; char im[5]; }; struct map /* this is the map structure*/ { char data[20]; char add_data[20]; int amount; int x; /* this were the successor keeps it's x & y values*/ int y; }; struct location /*this structure is for the successor lister*/ { float height; char obj;

c语言程序代码

1.要求在屏幕上输出下一行信息。 This is a c program. 程序: #include int main() { printf(“this is a c program.\n”); return 0; } 2.求两个整数之和。 程序: #include int main() { int a,b,sum; a=122; b=234; sum=a+b; printf(“sum is %d\n”,sum); return 0; } 3.求两个整数之间的较大者。

#include int main() { int max(int x,int y); int a,b,c; scanf("%d,%d",&a,&b); c=max(a,b); printf("max=%d\n",c); return 0; } int max(int x,int y) { int z; if(x>y)z=x; else z=y; return(z); } 4.有人用温度计测量出华氏发表示的温度(如69°F),今要求把 她转换成以摄氏法表示的温度(如20℃)。 公式:c=5(f-32)/9. 其中f代表华氏温度,c代表摄氏温度。

#include int main() { float f,c; f=64.0; c=(5.0/9)*(f-32); printf("f=%f\nc=%f\n",f,c); return 0; } 5.计算存款利息。有1000元,想存一年。有一下三种方法可选: (1)活期:年利率为r1;(2)一年定期:年利率为r2;(3)存两次半年定期:年利率为r3。分别计算一年后按三种方法所得到的本息和。 程序: #include int main() { float p0=1000,r1=0.0036,r2=0.0225,r3=0.0198,p1,p2,p3; p1=p0*(1+r1); p2=p0*(1+r2);

C++string类型总结

对C++中string类型的总结 string类对象的构造 简化构造函数原型如下(注意,为了简便,把模板中最后一个默认参数省略了): 1: explicit basic_string(); 2: string(const char *s); 3: string(const char *s, size_type n); 4: string(const string& str); 5: string(const string& str, size_type pos, size_type n); 6: string(size_type n, E c); 7: string(const_iterator first, const_iterator last); string对象的操作 字符串比较 支持六种关系运算符(==、!=、>、>=、<、<=),其采用字典排序策略(与C中字符串比较策略完全一样)。这六个关系运算符是非成员的重载运算符。而这些 运算符都支持三种操作数组合:string op string、string op const char*、cons t char* op string(其中op是前面六种关系运算符中任意一种)。解释:提供运算 符的三种重载版本主要是从效率角度考虑的,其避免了临时string对象的产生。 另外,string类还提供了各种重载版本的成员函数compare来比较,简化函数原型为: 1: int compare(const string& str) const; 2: int compare(size_type p0, size_type n0, const string& str); 3: int compare(size_type p0, size_type n0, const string& str, si ze_type pos, size_type n); 4: int compare(const char* s) const; 5: int compare(size_type p0, size_type n0, const char* s) const; 6: int compare(size_type p0, size_type n0, const char* s, size_t ype n) const; 返回值:如果调用该函数的对象的比较序列小于操作数比较序列,则返回负数; 若相等,则返回0;否则,返回正数。

C语言游戏源代码最新版

C语言游戏源代码 1、简单的开机密码程序 #include "conio.h" #include "string.h" #include "stdio.h" void error() {window(12,10,68,10); textbackground(15); textcolor(132); clrscr(); cprintf("file or system error! you can't enter the system!!!"); while(1); /*若有错误不能通过程序*/ } void look() {FILE *fauto,*fbak; char *pass="c:\\windows\\password.exe"; /*本程序的位置*/ char a[25],ch; char *au="autoexec.bat",*bname="hecfback.^^^"; /*bname 是autoexec.bat 的备份*/ setdisk(2); /*set currently disk c:*/ chdir("\\"); /*set currently directory \*/ fauto=fopen(au,"r+"); if (fauto==NULL) {fauto=fopen(au,"w+"); if (fauto==NULL) error();} fread(a,23,1,fauto); /*读取autoexec.bat前23各字符*/ a[23]='\0'; if (strcmp(a,pass)==0) /*若读取的和pass指针一样就关闭文件,不然就添加*/ fclose(fauto); else {fbak=fopen(bname,"w+"); if (fbak==NULL) error(); fwrite(pass,23,1,fbak); fputc('\n',fbak); rewind(fauto); while(!feof(fauto)) {ch=fgetc(fauto); fputc(ch,fbak);} rewind(fauto); rewind(fbak); while(!feof(fbak))

C语言编程游戏代码

#include #include #include #include #include #define L 1 #define LX 15 #define L Y 4 static struct BLOCK { int x0,y0,x1,y1,x2,y2,x3,y3; int color,next; intb[]={{0,1,1,1,2,1,3,1,4,1},{1,0,1,3,1,2,1,1,4,0},{1,1,2,2,1,2,2,1,1,2},{0,1,1,1,1,0,2,0,2,4}, {0,0,0,1,1,2,1,1,2,3},{0,0,1,0,1,1,2,1,3,8},{1,0,1,1,2,2,2,1,2,5},{0,2,1,2,1,1,2,1,2,6},{0,1,0,2,1,1,1 ,0,3,9},{0,1,1,1,1,2,2,2,3,10},{1,1,1,2,2,1,2,0,3,7},{ 1,0,1,1,1,2,2,2,7,12},{0,1,1,1,2,1,2,0,7,13},{0 ,0,1,2,1,1,1,0,7,14},{0,1,0,2,1,1,2,1,7,11},{0,2,1,2,1,1,1,0,5,16},{0,1,1,1,2,2,2,1,5,17},{1,0,1,1,1, 2,2,0,5,18},{0,0,0,1,1,11,2,1,5,15},{0,1,1,1,1,0,2,1,6,2,0},{0,1,1,2,1,1,1,0,6,21},{0,1,1,2,1,1,2,1,6 ,22},{1,0,1,1,1,2,2,1,6,19}}; static int d[10]={33000,3000,1600,1200,900,800,600,400,300,200}; int Llevel,Lcurrent,Lnext,Lable,lx,ly,Lsum; unsigned Lpoint; int La[19][10],FLAG,sum; unsigned ldelay; void scrint(),datainit(),dispb(),eraseeb(); void throw(),judge(),delayp(),move(0,note(0,show(); int Ldrop(),Ljudge(),nextb(),routejudge(); } main() { char c; datainit(); Label=nextb(); Label=Ldrop(); while(1){ delayp(); if(Label!=0) { Ljudge(); Lable=nextb(); } ldelay--; if(ldelay==0)

JAVA实验报告四(实现String类)

JA V A实验报告实验四运用JavaFx实现时钟动画 班级:计算机科学与技术1306 学号: 00 姓名:王雨思 指导教师:鲁鸣鸣 2014 年 12 月 1 日

目录 一.概述 (6) 二.总体方案设计 (7) 三.详细设计 (8) 四.程序的调试与运行结果说明 (9) 五.课程设计总结 (10) 六.后记 (11) 七.附录 (12) 参考文献 (13)

一概述 1.课程设计的目的 了解和掌握String类的实现原理 2.课程设计的要求 基于ArrayList实现可以深度复制(Deep Copy)的栈结构。1.首先用ArrayList实现栈结构 2.接着将第1步实现的栈通过Clonable接口实现深度复制 3.课程设计的主要设计思想 基于ArrayList实现可以深度复制(Deep Copy)的栈结构。二总体方案设计 编写程序实现MyString类的下列操作: public MyString(char[] chars); public char charAt(int index); public int length(); public MyString substring(int begin, int end); public MyString toLowerCase(); public boolean equals(MyString s); public static MyString valueOf(int i); public int compare(String s); public MyString substring(int begin); public MyString toUpperCase(); public char[] toChars();

C语言代码大全

------------------------------------------------------------------------摘自宋鲁生程序设计大赛 乘法口诀表 #include #include void main(void) { int i,j,x,y; clrscr(); printf("\n\n * * * 乘法口诀表* * * \n\n"); x=9; y=5; for(i=1;i<=9;i++) { gotoxy(x,y); printf("%2d ",i); x+=3; } x=7; y=6; for(i=1;i<=9;i++) { gotoxy(x,y); printf("%2d ",i); y++; } x=9; y= 6; for(i=1;i<=9;i++) { for(j=1;j<=9;j++) { gotoxy(x,y); printf("%2d ",i*j); y++; } y-=9; x+=3; } printf("\n\n"); }

用一维数组统计学生成绩 #include void main() { char SelectKey,CreditMoney,DebitMoney; while(1) { do{ clrscr(); puts("========================="); puts("| Please select key: |"); puts("| 1. Quary |"); puts("| 2. Credit |"); puts("| 3. Debit |"); puts("| 4. Return |"); puts("========================="); SelectKey = getch(); }while( SelectKey!='1' && SelectKey!='2' && SelectKey!='3' && SelectKey!='4' ); switch(SelectKey) { case '1': clrscr(); puts("================================"); puts("| Your balance is $1000. |"); puts("| Press any key to return... |"); puts("================================"); getch(); break; case '2': do{ clrscr(); puts("=================================="); puts("| Please select Credit money: |"); puts("| 1. $50 |"); puts("| 2. $100 |"); puts("| 3. Return |"); puts("=================================="); CreditMoney = getch(); }while( CreditMoney!='1' && CreditMoney!='2' && CreditMoney!='3' ); switch(CreditMoney)

c语言程序代码

创作编号: GB8878185555334563BT9125XW 创作者:凤呜大王* 1.要求在屏幕上输出下一行信息。 This is a c program. 程序: #include int main() { printf(“this is a c program.\n”); return 0; } 2.求两个整数之和。 程序: #include int main() { int a,b,sum; a=122; b=234;

sum=a+b; printf(“sum is %d\n”,sum); return 0; } 3.求两个整数之间的较大者。 程序: #include int main() { int max(int x,int y); int a,b,c; scanf("%d,%d",&a,&b); c=max(a,b); printf("max=%d\n",c); return 0; } int max(int x,int y) { int z; if(x>y)z=x; else z=y; return(z);

} 4.有人用温度计测量出华氏发表示的温度(如69°F),今要 求把她转换成以摄氏法表示的温度(如20℃)。 公式:c=5(f-32)/9. 其中f代表华氏温度,c代表摄氏温度。 程序: #include int main() { float f,c; f=64.0; c=(5.0/9)*(f-32); printf("f=%f\nc=%f\n",f,c); return 0; } 5.计算存款利息。有1000元,想存一年。有一下三种方法可 选:(1)活期:年利率为r1;(2)一年定期:年利率为r2; (3)存两次半年定期:年利率为r3。分别计算一年后按三种方法所得到的本息和。 程序: #include

编写strcpy函数和类String的构造函数、析构函数、赋值函数和重载运算符函数

编写strcpy函数和类String的构造函数、析构函数、赋值函数和重载运算符函数 已知strcpy函数的原型是 char *strcpy(char *strDest, const char *strSrc); 其中strDest是目的字符串,strSrc是源字符串。 (1)不调用C++/C的字符串库函数,请编写函数strcpy char *strcpy(char *strDest, const char *strSrc); //将源字符串加const,表明其为输入参数 { assert((strDest!=NULL) && (strSrc !=NULL)); // 2分 //对源地址和目的地址加非0断言 char *address = strDest; // 2分//为了实现链式操作,将目的地址返回 while( (*strDest++ = * strSrc++) != …\0? ) // 2分 NULL ; return address ; // 2分 } (2)strcpy能把strSrc的内容复制到strDest,为什么还要char * 类型的返回值? 答:为了实现链式表达式。// 2分 例如int length = strlen( strcpy( strDest, “hello world”) ); 二、网上广泛流传的,也是摘自林锐的 http://www.blog.sh/user3/skyflowing/archives/2006/60452.html 题目: 已知strcpy函数的原型是: char * strcpy(char * strDest,const char * strSrc); 1.不调用库函数,实现strcpy函数。 2.解释为什么要返回char *。

c语言基本代码

c语言基本代码 Prepared on 22 November 2020

'\0':是字符串的结束标志 ‘‘:空格 auto:声明自动变量一般不使用 double:声明双精度变量或函数(和%lf连用), m=(double)(v-l)/l*100+; 这个式子加个double是将后面式子中非double类型强制转换类型为double float:声明浮点型变量或函数(和%f连用),单精度 int:声明整型变量或函数(与%d连用) struct:声明结构体变量或函数 long:声明长整型变量或函数 switch:用于开关语句 enum:声明枚举类型 register:声明积存器变量 typedef:用以给数据类型取别名(当然还有其他作用) extern:声明变量是在其他文件正声明(也可以看做是引用变量) return:子程序返回语句(可以带参数,也看不带参数) union:声明联合数据类型 const:声明只读变量 short:声明短整型变量或函数 unsigned:声明无符号类型变量或函数 signed:生命有符号类型变量或函数 void:声明函数无返回值或无参数,声明无类型指针(基本上就这三个作用)default:开关语句中的“其他”分支 goto:无条件跳转语句 sizeof:计算数据类型长度,,是整型表达式用法sizeof(类型说明符,数组名或表达式);sizeof()是获取类型占用的字节数,是整形的 volatile:说明变量在程序执行中可被隐含地改变 static:声明静态变量 char:声明字符型变量或函数 strcmp:strcmp(s1,s2)比较字符串大小两个字符串自左向右逐个字符相比(按ASCII值大小相比较),直到出现不同的字符或遇'\0'为止大于返回1小于返回-1等于返回0 循环: for:一种循环语句(可意会不可言传)for(表达式1;表达式2;表达式3)while:循环语句的循环条件 do:循环语句的循环体 break:跳出当前循环 continue:结束当前循环,开始下一轮循环 判断: d=a>30b:c:相当于if暨当a>30是d=b否则d=c;

java对象转换String类型的三种方法

北大青鸟中关村 java对象转换String类型的三种方法在很多情况下我们都需要将一个对象转换为String类型。一般来说有三种方法可以实现:Object.toString()、(String)Object、String.valueOf(Object)。下面对这三种方法一一分析 一、采用Object.toString() toString方法是https://www.wendangku.net/doc/548055776.html,ng.Object对象的一个public方法。在java中任何对象都会继承Object 对象,所以一般来说任何对象都可以调用toString这个方法。这是采用该种方法时,常派生类会覆盖Object里的toString()方法。 但是在使用该方法时要注意,必须保证Object不是null值,否则将抛出NullPointerException 异常。 二、采用(String)Object 该方法是一个标准的类型转换的方法,可以将Object转换为String。但是在使用该方法是要注意的是需要转换的类型必须是能够转换为String的,否则会出现CalssCastException异常错误。 代码代码如下: Object o = new Integer(100); String string = (String)o; 这段程序代码会出现https://www.wendangku.net/doc/548055776.html,ng.ClassCastException: https://www.wendangku.net/doc/548055776.html,ng.Integer cannot be cast to https://www.wendangku.net/doc/548055776.html,ng.String。因为将Integer类型强制转换为String类型,无法通过。 三、String.valueOf(Object) 上面我们使用Object.toString()方法时需要担心null问题。但是使用该方法无需担心null值问题。因为在使用String.valueOf(Object)时,它会判断Object是否为空值,如果是,则返回null。下面为String.valueOf(Object)的源码: 代码代码如下: public static String valueOf(Object obj) { return (obj == null) ? "null" : obj.toString(); } 从上面我们可以看出两点:一是不需要担心null问题。二是它是以toString()方法为基础的。但是一定要注意:当object为null时,String.valueOf(object)的值是字符串对象:"null",而不是null!!!

c语言课程设计源代码

c语言课程设计源代码标准化管理处编码[BBX968T-XBB8968-NNJ668-MM9N]

学校运动会管理系统问题描述: (1) 初始化输入:N-参赛院系总数,M-男子竞赛项目数,W-女子竞赛项目数; (2) 各项目名次取法有如下几种: 取前5名:第1名得分 7,第2名得分 5,第3名得分3,第4名得分2,第5名得分 1; (3) 由程序提醒用户填写比赛结果,输入各项目获奖运动员的信息。 (4) 所有信息记录完毕后,用户可以查询各个院系或个人的比赛成绩,生成团体总分报表,查看参赛院系信息、获奖运动员、比赛项目信息等。 程序代码: #include<> #include<> #define N 3 #define M 3 #define W 3 char* n_number[3]={"1","院系2","院系3"}; char* m_number[3]={"1","男项2","男项3"};

char* w_number[3]={"女项1","女项2","女项3"}; int size=2; struct student { char num[10]; char name[20]; char xiangmu[20]; int score; char ximing[20]; }stu[100],temp; void input() um,&stu[i].name,&stu[i].xiangmu,&stu[i].score,&stu[i].ximing); iming,n_number[0])==0) iming); iming,n_number[h])==0) for(int s=0;s

C语言源代码

剪刀石头布源代码 #include #include main() { int d,x; { printf("请输入:1是剪刀,2是石头,3是布"); scanf("%d",&d); x=rand()%3; if(d==x) printf("双方平局"); else if((d==1&&x==2)||(d==2&&x==3)||(d==3&&x==1)) printf("你赢了"); else printf("电脑赢了"); } }

简单计算器 #include main() { int a,b,d=0; char c; while(d==0) { printf("请开始计算,请输入需要运算的数字和运算法则,数字符号数字:"); scanf("%d%c%d",&a,&c,&b); switch(c) { case'+': printf("%d+%d=%d\n",a,b,a+b); break; case'-': printf("%d-%d=%d\n",a,b,a-b); break; case'*': printf("%d*%d=%d\n",a,b,a*b); break; case'/': if(0==b) printf("除法被除数不能为零!\n") ; else printf("%d/%d=%d\n",a,b,a/b); break; } } }

加油站加油问题 #include int main() { double a = 3.25, b = 3.00, c= 2.75; double d = 0.05, e = 0.10, m; int x,y,z; printf("请输入您要的加油量:"); scanf("%d",&x); printf("请输入您要的汽油种类,1-a型汽油售价3.25元/千克,2-b型汽油售价3.00元/千克,3-c型汽油售价2.75元/千克:"); scanf("%d",&y); printf("请输入您要的服务类型,1-自己加服务优惠0.05,2-协助加服务优惠0.10:"); scanf("%d",&z); switch(y) { case 1: y = a;break; case 2: y = b;break; case 3: y = c;break; } if(z == 1) m = (1 - d) * y * x; else if(z == 2) m = (1 - e) * y * x; printf("您需要支付:%f 元,谢谢惠顾,欢迎下次再来",m); return 0; }

(完整word版)一些简单的C语言程序代码

由键盘任意输入1个4位数整数,分别输出其中的个位、十位、百位、千位。 /* expe 3-10 */ #include #include void main(void) { int mun,a,b,c,d; scanf("%d",&mun); a=mun / 1000; /*千位*/ b=(mun % 1000) / 100; /*百位*/ c=(mun % 100) / 10; /*十位*/ d=(mun % 10); /*个位*/ printf("千位数字为=%d\n",a); printf("百位数字为=%d\n",b); printf("十位数字为=%d\n",c); printf("个位数字为=%d\n",d); } 由键盘任意输入3个数据,找出其中的最大数和最小数。 #include void main(void) { float a,b,c,k,g;/* k 小g 大*/ printf ("请输入三个数"); scanf("%f%f%f",&a,&b,&c); if (a < b) { k = a; g = b; } else { k = b; g = a; } if (k < c)/*最小*/ { printf ("\n最小的数=%5.2f",k);} else {printf ("\n最小的数=%5.2f",c);} if (g > c)/*最大*/ {printf ("\n最大的数=%5.2f",g);} else {printf ("\n最大的数=%5.2f",c);} } 判断三角形的形状 #include #include void main(void) { printf("请输入三角形三边"); float a,b,c,p,s,k1,k2,k3; scanf("%f%f%f",&a,&b,&c); while (a + b < c || b + c < a || a + c < b ) { printf("不能构成三角形,请重新输入"); scanf("%f%f%f",&a,&b,&c); } k1 = a * a; k2 = b * b; k3 = c * c; if (a == b && b == c && c ==a) {printf("此三角形为等边三角形");} else if (a == b || b == c || c ==a) {printf("此三角形为等腰三角形"); } else if ((k1 == b * b + c * c) || (k2 == a * a + c * c) || (k3 = a * a + b * b)) {printf("此三角形为直角三角形");} else {printf("此三角形为一般三角形");} } 九九乘法表 整体 #include void main(void) { int i,j;

【实验5】c++MyString类实现

ccnu_hupo_cpp_class_tst6exercise2_by:lele_2013_10_30 new不忘delete Design the string class in the C++ library by providing your own implementation for the following functions (name your class MyString): MyString();//构造 MyString(const char* cString);//地址不能变 char at(int index) const;//输入数组下标,返回字符 int length() const;//长度 void clear();//清空len=0 bool empty() const;//是否清空?len不变 int compare(const MyString& s) const;// int compare(int index, int n, const MyString& s) const; void copy(char s[], int index, int n); char* data() const; int find(char ch) const; int find(char ch, int index) const; int find(const MyString& s, int index) const; */ #include #include using namespace std; class MyString { public: MyString(); MyString(const char* cString); char at(int index) const;// int length() const; void clear(); bool empty() const; int compare(const MyString& s) const; int compare(int index, int n, const MyString& s) const; void copy(char s[], int index, int n); char* data() const; int find(char ch) const; int find(char ch, int index) const; int find(const MyString& s, int index) const; ~MyString()

一个C语言写的简单贪吃蛇源代码

#include #include #include #include #include #include int grade=5,point=0,life=3; void set(),menu(),move_head(),move_body(),move(),init_insect(),left(),upon(),right(),down(),init_grap h(),food_f(),ahead(),crate(); struct bug { int x; int y; struct bug *last; struct bug *next; }; struct fd { int x; int y; int judge; }food={0,0,0}; struct bug *head_f=NULL,*head_l,*p1=NULL,*p2=NULL; void main() { char ch; initgraph(800,600); set(); init_insect(); while(1) { food_f(); Sleep(grade*10); setcolor(BLACK); circle(head_l->x,head_l->y,2); setcolor(WHITE); move_body(); if(kbhit()) { ch=getch(); if(ch==27) { ahead();

set(); } else if(ch==-32) { switch(getch()) { case 72:upon();break; case 80:down();break; case 75:left();break; case 77:right();break; } } else ahead(); } else { ahead(); } if(head_f->x==food.x&&head_f->y==food.y) { Sleep(100); crate(); food.judge=0; point=point+(6-grade)*10; if(food.x<30||food.y<30||food.x>570||food.y>570) life++; menu(); } if(head_f->x<5||head_f->x>595||head_f->y<5||head_f->y>595) { Sleep(1000); life--; food.judge=0; init_graph(); init_insect(); menu(); } for(p1=head_f->next;p1!=NULL;p1=p1->next) { if(head_f->x==p1->x&&head_f->y==p1->y) { Sleep(1000); life--; food.judge=0;

一些比较简c语言程序源代码

/**返回的long型的最大值是startLongValue+count-1(产生一个随机数) * param needCount * param count * param startLongValue * return */ public static List randomNoRepeatLongArray(int needCount,int count,long startLongValue){ //这种情况会出现无限循环的 if(needCount>count) return null; Random random = new Random(); int[] ints = new int[count]; for(int i=0;i list = new ArrayList(); while(list.size() #include #include

各个类及其方法的实现

客户端:(六个类) ChatClient、Denglu、Hall、HUIQICC 、Panecc、Registry 功能: 1、ChatClient: * 该类主要关于客户端与服务器之间的通信,包括聊天信息、悔棋信息、认输信息、退出信息、注册信息、登陆信息等等* 通过该类还调用了大量的Panecc类的方法,实现通信信息在界面上的实现 * * 主要方法是Connect(),通过调用该方法建立与服务器端的连接,在该方法里,new了一个Thread对象, * 同时架设了经过初步包装基本的管道(DataInputStream和DataOutputStream)。接下来便开始接收服务器端 * 发来的消息了,通过简单的协议,实现不同种类消息的接收和解析,该协议便是一串数字(int类型), * 在发送消息方法里先写进一串数字,再写入需要发送的消息内容。同理,接收消息时先读取数字,再根据不同的数字 * 解析出不同的消息种类。 * 除了Connect()方法之外,还有很多信息的发送方法,比如

聊天信息(SendMessage(String message))、登陆信息(SendLogin(String name,String key)) * 、注册信息(SendZhuce(String name,String pass))、发送猜先信息(sendcai(int a))等等 2、Denglu: * 该类是客户端的主驱动类,在该类中声明并初始化了ChatClient类的对象cc, * 并通过该对象调用了ChatClient类的许多方法; * 该类主要是关于登陆界面,并实现了相关监听; * 该类还存在一个内部类--paneLogin ,这个内部类主要是画界面,监听功能在主类中实现 * * 通过该类,将用户信息,发送给服务器,再由服务器连接数据库,判断登陆的相关信息。 3、Hall: * 该类是关于登陆大厅,存在一个内部类--hallt,该内部类

C语言游戏源代码

语言游戏源代码1、简单地开机密码程序 "" "" "" () {()()()()(" ! ' !!!"); (); *若有错误不能通过程序* } () { *,*; *":\\\\"; *本程序地位置* []; *"",*".^^^"; *是地备份*(); * :*("\\"); * \*(,""); () {(,""); () ();}(); *读取前各字符* []'\'; (()) *若读取地和指针一样就关闭文件,不然就添加*(); {(,""); () ()()('\'); (); (()) {()();} (); (); (()){()();}()(); (); * * } } () { *""; [] ; () {()()()(); ; ()()()()(":"); () {[](); (>) {(); ;} *若字符多于个字符就结束本次输入* ([]) ;

([]> []<) *若字符是数字或字母才算数* {('*'); ;} ([]) *删除键* (>) {("\ \"); []'\'; ;} } []'\'; (()) ; {(); ()()()()(" !")();} } } () {(); (); } 2、彩色贪吃蛇 <> <> ; * 游戏速度*, , ; * 游戏分数* [] { , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

相关文档