Planet of NCCUCS
dosbox windows resolution Buy Microsoft Windows Server 2008 Web Edition SP2 configure internet connection on windows xp consumer ratings on vinyl windows Buy Microsoft Windows 7 Professional buy dhcp windows 2000 server apple usb keyboard windows drivers Buy Microsoft Office Visio Professional 2007 buy windows xp registration number buy windows applications Buy Microsoft Windows XP Professional SP3 disable autoplay cd windows 2000 asms windows xp home Buy McAfee Total Protection 2009 autocad lt autodesk contemporary windows Buy Cyberlink PowerDVD 8 Ultra check windows genuine effects for windows movie maker Buy Corel VideoStudio Pro X2 audio codec windows cannot end programs in windows xp Buy CorelDraw Graphics Suite X4 borland delphi 5 and windows vista cannot open windows updates Buy Autodesk AutoCAD 2009 checkpoint ngx r65 windows 2003 download terminal services client windows 2000 Buy Autodesk AutoCAD 2010 download windows xp file debug windows application Buy Autodesk 3Ds Max Design 2009 convert dbx outlook express windows mail automatically reboot windows xp Buy Ahead Nero 9 ashampoo defrag windows xp serious error cannot install printer driver windows 2000 Buy Microsoft Office 2003 Professional apple toolbar for windows delay write failed windows xp Buy Microsoft Office 2007 Enterprise cleanup windows startup

Tag: C/C++

Singleton Pattern

作者:lui on 四月.28, 2010 Posted in RSS |

Singleton Pattern帶來的是保證一個class只有一個實體,無法產生第二個第三個… 使用這種模式的概念是系統中永遠只會唯一存在,如OS kernal、program core或hardward controller等。C++實作如下:
Comments Off :, , more...


Memento Pattern

作者:lui on 四月.21, 2010 Posted in RSS |

Mememto Pattern是一個簡單輕量的模式,基本上它十分簡單,也沒有必要複雜化。故名思義,這種模式是記錄一些回憶,過去資訊,目的是為了備份。在大型軟體中功能複雜而彈性,必定會提供...

Comments Off :, , more...

Policy-Based Class Design

作者:lui on 四月.17, 2010 Posted in RSS |

在C++新增template功能的初期,大家普遍認為template只是為物件導向設計得到更好的重用性,不單單將重複使用的程式碼設計成物件類別(class),連類別也重用,經由編譯器幫programmer把不同型別...

Comments Off :, , more...

Invoke pure virtual function

作者:lui on 十二月.11, 2009 Posted in RSS |

沒錯 你沒看錯
這篇的標題是呼叫純虛擬函式
一個沒有實作的純虛擬函式是有可能被呼叫起來的

class A {
public:
virtual void f(void) = 0;
};
class B : public A {
...

Comments Off : more...

C/C++ with MySQL

作者:lui on 七月.28, 2009 Posted in RSS |

最近一直找一個bug 找很久都找不出來

狀況是這樣子

在一台linux上裝上 MySQL 5.0, Apache 2.0, django 1.0, openssl 5.5.2

建立一台有網頁 有cgi 有ssl的平台

之後複製另一台成master an...

Comments Off : more...

Virtual function: Differences between C++ and Java

作者:RedBug on 五月.24, 2009 Posted in RSS |

 Purposes: Polymorphism (Dynamic Binding)
 

 
C++
Java

Pure Virtual Function
vitual void func() = 0;
abstarct void func();

Impure Virtual Function
vitual void func();
void f...

Comments Off :, more...

extern 與 extern “C”

作者:Anderson on 十二月.08, 2008 Posted in RSS |

整理一下看網友blog的文章筆記:
關於extern:
1. 在function外定義的變數就叫外部變數,相反的在function內就叫內部變數。2. 外部變數的視野是從定義的開始那行到本身檔案結束的最後一...

Comments Off : more...

struct的特別用法

作者:lui on 十一月.03, 2008 Posted in RSS |

#include

typedef struct A {
int up : 1;
int down : 1;
int left : 1;
int right : 1;
}Cell;

int main(void) {
Cell c;

c.up = c.down = c.left = c.right = 0;
[...]<...

Comments Off : more...

default constructor

作者:lui on 十月.01, 2008 Posted in RSS |

C++中預設建構子就是沒有參數的建構子

一般大多數人都有以下錯誤觀念:
1.class沒有定義預設建構子 compiler就會自動產生一個
2.compiler產生出來的預設建構子中 會為member data...

Comments Off : more...

tricky skill (1) in C

作者:lui on 九月.25, 2008 Posted in RSS |

struct rumble {
char c[1];
};

struct rumble *p = (struct rumble*) malloc(sizeof(struct rumble) + 5);

在C裡 有一個技巧就是在struct最後宣告一個單一元素的陣列
於是在malloc時就能擁有可變...

Comments Off : more...