2008年3月21日 星期五

C++教學(二十一):指標陣列 C++教學 哈啦論壇

C++教學(二十一):指標陣列 C++教學 哈啦論壇
C++ new 二維陣列:


int m, n;
int i, j;
int **ptr;

cout<<"輸入Array維度:"<< endl;
cin>> m >> n;

ptr = new int*[m];

for(i = 0; i < m; i++)
*(ptr+i) = new int[n];

for(i = 0; i < m; i++)
for(j = 0; j < n; j++)
ptr[i][j] = i+j;


for(i = 0; i < m; i++) {
for(j = 0; j < n; j++)
cout << ptr[i][j] << " ";
cout << endl;
}

for(i = 0; i < m; i++)
delete [] (*(ptr+i));

delete [] ptr;

CSE2305 Topic 19: C++ Operator Overloading

CSE2305 Topic 19: C++ Operator Overloading

Which operators can be overloaded?

  • The following operators can be overloaded:
  1. Unary operators:

    + - * & ~ ! ++ -- -> ->*
  2. Binary operators:

    + - * / % ^ & | << >>
    += -= *= /= %= ^= &= |= <<= >>=
    < <= > >= == != && ||
    , [] ()
    new new[] delete delete[]

CSE2305 Topic 19: C++ Operator Overloading

CSE2305 Topic 19: C++ Operator Overloading:

An important use of operator overloading¤

  • Because we can overload the operators << and >>, we can allow user-defined classes¤ to perform I/O just like inbuilt types (!)
  • For example:
    #include 

    class Complex
    {
    public:
    Complex(float re, float im)
    : myReal(re), myImag(im)
    {}

    friend istream& operator>>(istream&, Complex&);
    friend ostream& operator<<(ostream&, const Complex&);

    private:
    float myReal;
    float myImag;
    };

    istream& operator>>(istream& in, Complex& c)
    {
    double real, imag;
    in >> real >> imag;
    if (in.good())
    {
    c.myReal = real;
    c.myImag = imag;
    }
    return in;
    }

    ostream& operator<<(ostream& out, const Complex& c)
    {
    out << "(" << c.myReal << "," << c.myImag << ")";
    return out;
    }

C++: Constructor - Tech-Recipes.com

C++: Constructor - Tech-Recipes.com
Paramenter List Constructor 2:

Constructor(String n, int s, String t):name(n),size(s),text(t) {}

2008年3月20日 星期四

資訊組網誌 : ◎ 開放源碼的隨身碟防毒軟體 - Wow! 隨身碟防毒系列

資訊組網誌 : ◎ 開放源碼的隨身碟防毒軟體 - Wow! 隨身碟防毒系列
Wow! USB Protector 與 Wow! USB VirusKiller 比較表
=======================================
程式 Wow! USB Protector Wow! USB VirusKiller
---------------------------------------
適合對象 了解隨身碟病毒的使用者 電腦初學的新手
偵測出隨身碟病毒 多種選項供使用者選擇 自動刪除惡意程式
偵測出可疑程式 多種選項供使用者選擇 提出可疑程式檔案的警訊
專案網址 Wow! USB Protector Wow! USB VirusKiller
=======================================

2008年3月19日 星期三

Taiwan.CNET.com > 數位生活 > 軟體應用 > 瀏覽器Beta大混戰!IE 8 vs Opera 9.5 vs Safari 3 vs Firefox 3(�

Taiwan.CNET.com > 數位生活 > 軟體應用 > 瀏覽器Beta大混戰!IE 8 vs Opera 9.5 vs Safari 3 vs Firefox 3(�
Microsoft Internet Explorer 8, beta 1
IE 有趣的新功能之一是「Web Slices」,網頁開發者可以指定網站的一個區塊當作「可切割區塊」(sliceable),然後那個區塊的更新可以用分頁的方式來呈現。

活動(Activites)也是新玩意,加入到瀏覽器右鍵選單中,比如說「送到digg」、「分享到Facebook上」。不過在剛安裝完的版本中僅有內 建 自家的一些功能,比如說「用Live Search搜尋」、「用Windows Live Spaces來blog這篇文章」。我們可以想像這是一個實用的功能,即時類似的功能在Firefox上早就可以用附加套件來做到了。(編按,我自己就用 了ScribeFire和IE Tab)

微軟也內建了自動回復功能(Automated Crash Recovery,在Firefox 2.0出現的功能之一)

pcmcia to express card - Tech Support Forums - TechIMO.com

pcmcia to express card - Tech Support Forums - TechIMO.com
Quote:
Originally Posted by I2n0ld View Post
Do you know of any adapters? I tried searching and the only one i can find is still in development.

I just want to use my old PCMCIA card on my new laptop.

try this it might help, my company is getting into a lot of problem because of this new format, pc manufacturers just decided to drop the PCMCIA standard for the new pc express without thinking about upgrade/migration path, it's probablt a money racket

http://www.duel-systems.com/products/adapters.aspx

Taiwan.CNET.com > 部落格 > Skyvee > 好大方! 50GB 免費網路硬碟隨你用

Taiwan.CNET.com > 部落格 > Skyvee > 好大方! 50GB 免費網路硬碟隨你用
ADrive : http://www.adrive.com/

2008年3月18日 星期二

比同文堂更好用的 Firefox 簡繁轉換擴展 - GB2Big | PC Headline

比同文堂更好用的 Firefox 簡繁轉換擴展 - GB2Big | PC Headline
是跟同文堂比還是跟新同文堂比?

用Windows Media Player收看20個高解析度電視頻道(奧運轉播、ESPN、中天、AXN、衛視�

用Windows Media Player收看20個高解析度電視頻道(奧運轉播、ESPN、中天、AXN、衛視�

頻道清單:

01 鳳凰衛視資訊台,網址:mms://211.167.102.67/ch-01
02 鳳凰衛視中文台,網址:mms://211.167.102.67/ch-02
03 Channel V 音樂台,網址:mms://211.167.102.67/ch-03
04 英文台,網址:mms://211.167.102.67/ch-04
05 TVB8,網址:mms://211.167.102.67/ch-05
06 華娛,網址:mms://211.167.102.67/ch-06
07 TVB星河,網址:mms://211.167.102.67/ch-07
08 TVNS 是個港台娛樂台,網址:mms://211.167.102.67/ch-08
09 中央電視台奧運頻道,網址:mms://211.167.102.67/ch-09
10 LIVE體育台,網址:mms://211.167.102.67/ch-10
11 Discovery,網址:mms://211.167.102.67/ch-11
12 東風台,網址:mms://211.167.102.67/ch-12
13 today,網址:mms://211.167.102.67/ch-13
14 ESPN,網址:mms://211.167.102.67/ch-14
15 E娛樂,網址:mms://211.167.102.67/ch-15
16 中天綜合台,網址:mms://211.167.102.67/ch-16
17 衛視體育台,網址:mms://211.167.102.67/ch-17
18 東森電影台,網址:mms://211.167.102.67/ch-18
19 NGC,國家地理,網址:mms://211.167.102.67/ch-19
20 AXN ,網址:mms://211.167.102.67/ch-20


收看方法:使用Windows Media Player開啟網址:「mms://211.167.102.67/ch-編號」,如要收看東森電影台,請輸入「mms://211.167.102.67/ch-18」即可。

第1步 請開啟Windows Media Player軟體,在左上角的箭頭處按一下滑鼠右鍵,再點選【檔案】→【開啟URL】。或者你可以直接按〔Ctrl〕+〔U〕快速鍵,一樣可以開啟URL輸入視窗。