上一页 1 ··· 8 9 10 11 12
摘要: 整个游戏由3个类构成。Bird类,Pipe类,stage类第一步:首先写一个Bird类//鸟类public class Bird { private int flyHeight;//飞行高度 private int xpos;//距离y轴(窗口左边缘)的位置, pub... 阅读全文
posted @ 2016-06-18 21:04 键盘手小陈 阅读(602) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;int Pow(int x, int n){ if (n == 1) return x; else if (n > 1) { int s; int m = n / 2; s = Pow (x, m); ... 阅读全文
posted @ 2016-06-16 21:45 键盘手小陈 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 1 - paint() 中调用 paintComponent(), paintBorder(), paintChildren()2 - 最重要的区别是“双缓冲”。Swing 组件的 paint() 中实现了双缓冲,所以不要随便去覆写,会破坏双缓冲的,————建议的方式... 阅读全文
posted @ 2016-06-16 21:13 键盘手小陈 阅读(830) 评论(0) 推荐(0) 编辑
摘要: 1.使用static可以声明一个内部类, 可以直接在外部调用[java] view plain copyclass Outer{ // 定义外部类 private static String info = "hello world" ; ... 阅读全文
posted @ 2016-04-04 17:37 键盘手小陈 阅读(937) 评论(0) 推荐(1) 编辑
摘要: Binary String Matching时间限制:3000 ms | 内存限制:65535 KB难度:3描述Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your tas... 阅读全文
posted @ 2015-06-06 11:32 键盘手小陈 阅读(202) 评论(0) 推荐(0) 编辑
摘要: getchar()是从缓冲区读入字符的。当输入字符后按下enter键,字符就会被送入缓冲区。getchar()读取的字符不只是一个,可以配合while循环读取一连串的字符,即getchar()每次读取的字符都会更新,直至读到‘\n'下面用代码来演示如何判断getcha... 阅读全文
posted @ 2015-06-04 17:28 键盘手小陈 阅读(723) 评论(0) 推荐(0) 编辑
摘要: 括号配对问题描述现在,有一行括号序列,请你检查这行括号是否配对。输入第一行输入一个数N(0using namespace std;struct Stack { char str[100]; int i;//入栈的编号 };int... 阅读全文
posted @ 2015-06-04 16:05 键盘手小陈 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 括号配对问题描述现在,有一行括号序列,请你检查这行括号是否配对。输入第一行输入一个数N(0using namespace std;struct Stack { char str[100]; int i;//入栈的编号 };int... 阅读全文
posted @ 2015-06-04 16:04 键盘手小陈 阅读(260) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS#include#include#include#includetypedef struct{ long num; char name[10]; char date[15]; double pay;}emp... 阅读全文
posted @ 2015-05-28 23:06 键盘手小陈 阅读(121) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12