上一页 1 ··· 3 4 5 6 7 8 9 下一页

44(function pointer 2)

摘要: #include using namespace std; class A { public: int x; int sayhello() { cout*pointer1 *classAfunctionpointer1)(); (b.*classAfunctionpointer1)(); return 0; } 阅读全文
posted @ 2017-04-18 18:24 tuzhuo 阅读(142) 评论(0) 推荐(0) 编辑

C++中的类成员指针

摘要: 写在前面:本博客为本人原创,严禁任何形式的转载!本博客只允许放在博客园(.cnblogs.com),如果您在其他网站看到这篇博文,请通过下面这个唯一的合法链接转到原文! 本博客全网唯一合法URL:http://www.cnblogs.com/acm-icpcer/p/6729273.html C++ 阅读全文
posted @ 2017-04-18 18:23 tuzhuo 阅读(403) 评论(0) 推荐(0) 编辑

43(function pointer 1)

摘要: #include using namespace std; typedef int A; typedef void (*PF)(); typedef int (*P_Adder)(double,long); void hello() { cout<<"hello"<<endl; } A inc(A x) { return x+1; } int adder(double x,... 阅读全文
posted @ 2017-04-18 17:07 tuzhuo 阅读(115) 评论(0) 推荐(0) 编辑

google traslation

只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2017-04-15 20:33 tuzhuo 阅读(9) 评论(0) 推荐(0) 编辑

C++函数指针

摘要: 写在前面:本博客为本人原创,严禁任何形式的转载!本博客只允许放在博客园(.cnblogs.com),如果您在其他网站看到这篇博文,请通过下面这个唯一的合法链接转到原文! 本博客全网唯一合法URL:http://www.cnblogs.com/acm-icpcer/p/6693942.html C++ 阅读全文
posted @ 2017-04-11 16:01 tuzhuo 阅读(196) 评论(0) 推荐(0) 编辑

模态与非模态

摘要: QDialog的显示有两个函数show()和exec() 他们的区别在参考文档上的解释如下: 1.show():显示一个非模式对话框。控制权即刻返回给调用函数。弹出窗口是否模式对话框,取决于modal属性的值。(原文:Shows the dialog as a modeless dialog. Co 阅读全文
posted @ 2017-04-07 15:18 tuzhuo 阅读(568) 评论(0) 推荐(0) 编辑

42

摘要: package test_21; import java.awt.*;import java.awt.event.*; class MyCanvas extends Canvas { private Image img; private Graphics og; public void init() 阅读全文
posted @ 2017-04-04 22:20 tuzhuo 阅读(86) 评论(0) 推荐(0) 编辑

41

摘要: package test_20; import java.awt.*;import java.awt.event.*; public class GraphicImageDemo extends Frame{ private Image img; public void init(){ setBou 阅读全文
posted @ 2017-04-04 22:19 tuzhuo 阅读(84) 评论(0) 推荐(0) 编辑

40

摘要: package test_18; import java.awt.*;import java.awt.event.*; class MyfirstWindowListener implements WindowListener{ public void windowClosing(WindowEve 阅读全文
posted @ 2017-04-04 22:18 tuzhuo 阅读(81) 评论(0) 推荐(0) 编辑

39

摘要: package test_17; import java.awt.*;import java.awt.event.*; public class Calc1 implements ActionListener { Frame f; TextField tf1; Button b1,b2,b3,b4; 阅读全文
posted @ 2017-04-04 22:17 tuzhuo 阅读(90) 评论(0) 推荐(0) 编辑

38

摘要: package test_12; import java.awt.*;import java.awt.event.*; class MyWindowListener implements WindowListener{ public void windowClosing(WindowEvent e) 阅读全文
posted @ 2017-04-04 22:16 tuzhuo 阅读(75) 评论(0) 推荐(0) 编辑

37

摘要: package test_11; import java.awt.*;public class GridBagLayoutDemo extends Frame { public static void main(String[] args){ Frame gd = new Frame("GridBa 阅读全文
posted @ 2017-04-04 22:15 tuzhuo 阅读(119) 评论(0) 推荐(0) 编辑

学记

摘要: 学记 《学记》,是古代中国典章制度专著《礼记》(《小戴礼记》)中的一篇,写作于战国晚期。相传为西汉戴圣编撰。据郭沫若考证,作者为孟子的学生乐正克。《学记》文字言简意赅,喻辞生动,系统而全面地阐明了教育的目的及作用,教育和教学的制度、原则和方法,教师的地位和作用,教育过程中的师生关系以及同学之间的关系 阅读全文
posted @ 2017-03-30 22:32 tuzhuo 阅读(476) 评论(0) 推荐(0) 编辑

36.java_exception_test

摘要: package mytext1; class TZException extends Exception{ TZException(String str){ super(str); } public String toString(String msg){ String tempt="the act 阅读全文
posted @ 2017-03-30 17:06 tuzhuo 阅读(105) 评论(0) 推荐(0) 编辑

c++中enum的用法——枚举类型

摘要: 将变量的可取值全部列举出来,写在程序的开头,使用该类型的时候显示地指定取值即可(即对枚举变量进行赋予元素操作,这里之所以叫赋元素操作不叫赋值操作就是为了说明枚举变量是不能直接赋予算数值的)。 如: enum egg {a,b,c}; enum egg test; //在这里可以简写egg test; 阅读全文
posted @ 2017-03-29 17:08 tuzhuo 阅读(754) 评论(0) 推荐(0) 编辑

35

摘要: #include <iostream>using namespace std; class Base1 { //基类Base1定义public: void display() const { cout << "Base1::display()" << endl; }}; class Base2: p 阅读全文
posted @ 2017-03-29 16:22 tuzhuo 阅读(86) 评论(0) 推荐(0) 编辑

34

摘要: #include <iostream>using namespace std; class Point { //Point类定义public: //外部接口 Point(int x = 0, int y = 0) : x(x), y(y) { //构造函数 //在构造函数中对count累加,所有对象 阅读全文
posted @ 2017-03-29 16:20 tuzhuo 阅读(151) 评论(0) 推荐(0) 编辑

33

摘要: #include <string>#include <iostream>using namespace std; class ExamInfo {public: //三种构造函数,分别用等级、是否通过和百分来初始化 ExamInfo(string name, char grade) : name(n 阅读全文
posted @ 2017-03-29 16:18 tuzhuo 阅读(91) 评论(0) 推荐(0) 编辑

32

摘要: #include <iostream>#include <cmath>using namespace std; class SavingsAccount {private: int id; double balance; double rate; int lastDate; double accum 阅读全文
posted @ 2017-03-29 16:17 tuzhuo 阅读(106) 评论(0) 推荐(0) 编辑

31

摘要: #include <iostream>using namespace std; class Clock {public: void setTime(int newH = 0, int newM = 0, int newS = 0); void showTime();private: int hour 阅读全文
posted @ 2017-03-29 16:16 tuzhuo 阅读(124) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 下一页