摘要: #include #include #include #include #include #include #include class MyWidget : public QWidget{public: MyWidget(QWidget *parent = 0);};MyWidget::MyWidget(QWidget *parent): QWidget(parent){ ... 阅读全文
posted @ 2009-04-01 10:42 jerry550409 阅读(366) 评论(0) 推荐(0) 编辑
摘要: CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include #include #include #include class MyWidget : public QWidget{public: MyWidget(QWidget *p... 阅读全文
posted @ 2009-04-01 10:11 jerry550409 阅读(165) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include int main(int argc, char *argv[]){ QApplication app(argc, argv); QWidget window; window.resize(400, 300); QPushButton quit("Quit", &windo... 阅读全文
posted @ 2009-04-01 09:35 jerry550409 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Google C++ Testing Framework_01 #include class MyMath{public: static int Add(int num1, int num2);};int MyMath::Add(int num1, int num2){ return num1 + num2;}TEST(MyMathTest, Positive){ EX... 阅读全文
posted @ 2009-03-22 14:50 jerry550409 阅读(156) 评论(0) 推荐(0) 编辑
摘要: CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->enum { ID_MYPROJECT_MSG_1 = ID_USER_PACKET_ENUM, ID_MYPROJECT_MSG_2, }; CodeCode highlighting pro... 阅读全文
posted @ 2009-02-25 14:51 jerry550409 阅读(251) 评论(0) 推荐(0) 编辑
摘要: CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include class CFruit{public: virtual void What() = 0;};class CApple : public CFruit{public: ... 阅读全文
posted @ 2009-02-19 16:53 jerry550409 阅读(100) 评论(0) 推荐(0) 编辑
摘要: # include using namespace std; #define WINDOWSclass Widget {public: virtual void draw() = 0;};class MotifButton : public Widget {public: void draw() { cout create_button(), facto... 阅读全文
posted @ 2009-02-19 00:54 jerry550409 阅读(126) 评论(0) 推荐(0) 编辑
摘要: # include using namespace std;#define MOTIFclass Widget {public: virtual void draw() = 0;};class MotifButton : public Widget {public: void draw() { cout draw(); w[1]->draw();}void display_window_... 阅读全文
posted @ 2009-02-19 00:38 jerry550409 阅读(142) 评论(0) 推荐(0) 编辑
摘要: #include "AbstractProductB.h"#include "AbstractProductA.h"#include "AbstractFactory.h"class Client{public: Client(); virtual ~Client(); AbstractProductB *m_AbstractProductB; AbstractProduc... 阅读全文
posted @ 2009-02-18 17:59 jerry550409 阅读(151) 评论(0) 推荐(0) 编辑
摘要: class Book{public: Book(); ~Book();private: Chapter newField;};class Chapter{public: Chapter(); ~Chapter();}; 阅读全文
posted @ 2009-02-08 08:55 jerry550409 阅读(165) 评论(0) 推荐(0) 编辑