<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4643307613381918844</id><updated>2012-02-16T10:30:13.543-08:00</updated><title type='text'>姓名筆劃測驗</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://strokesgame.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4643307613381918844/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://strokesgame.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>俊緯</name><uri>http://www.blogger.com/profile/08798773938573625253</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4643307613381918844.post-3937090044785871968</id><published>2010-01-19T20:16:00.000-08:00</published><updated>2010-01-19T20:54:37.030-08:00</updated><title type='text'>C++ virtual function 的另類呼叫法</title><content type='html'>今天早上學習了一下 C++ 對於 virtual function 是怎麼做的, 就寫了一個小程式來驗證一下, 果然如預期的, 程式如下:&lt;br /&gt;&lt;br /&gt;#include &lt;iostream.h&gt;&lt;br /&gt;&lt;br /&gt;typedef void (*pfn_t) (void *);&lt;br /&gt;&lt;br /&gt;class CObject&lt;br /&gt;{&lt;br /&gt;    char *m_pszStr;&lt;br /&gt;&lt;br /&gt;    virtual void vfunc()&lt;br /&gt;    {&lt;br /&gt;        m_pszStr = "Slash is the BEST!\n";&lt;br /&gt;        cout &lt;&lt; m_pszStr;&lt;br /&gt;    }&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;    CObject a;&lt;br /&gt;    pfn_t **p;&lt;br /&gt;&lt;br /&gt;    p = (pfn_t **) &amp; a;&lt;br /&gt;    (**p) (&amp;a);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;執行結果:&lt;br /&gt;&lt;br /&gt;[slash@slash ~]$ g++ -Wno-deprecated a.cpp&lt;br /&gt;[slash@slash ~]$ ./a.out&lt;br /&gt;Slash is the BEST!&lt;br /&gt;[slash@slash ~]$&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4643307613381918844-3937090044785871968?l=strokesgame.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strokesgame.blogspot.com/feeds/3937090044785871968/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4643307613381918844&amp;postID=3937090044785871968' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4643307613381918844/posts/default/3937090044785871968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4643307613381918844/posts/default/3937090044785871968'/><link rel='alternate' type='text/html' href='http://strokesgame.blogspot.com/2010/01/c-virtual-function.html' title='C++ virtual function 的另類呼叫法'/><author><name>俊緯</name><uri>http://www.blogger.com/profile/08798773938573625253</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4643307613381918844.post-7769030168572848451</id><published>2008-11-04T22:07:00.000-08:00</published><updated>2010-10-05T01:18:14.224-07:00</updated><title type='text'>姓名筆劃測驗</title><content type='html'>&lt;font color="#FF00FF"&gt;News: 10-Nov-2k5: 算筆畫函式 bug fixed! &lt;/font&gt;&lt;br /&gt;[2008/08/03]&lt;br /&gt;由於許多人對此測驗的結果太過認真, 因此作者決定將此網頁關閉.&lt;br /&gt;[2008/09/13]&lt;br /&gt;由於許多人要求開放, 作者折衷刪除了總評的部份, 再開放出來.&lt;br /&gt;    &lt;img src="http://freepics.addj.com/images/n5.gif"&gt;&lt;br /&gt;    &lt;b&gt;&lt;a href="http://apps.facebook.com/strokesgame/"&gt;Facebook app 版&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;請輸入您的姓名與對方的姓名:&lt;br /&gt;      &lt;form method="POST" action="http://mmc.shu.edu.tw/~slash/match1.php"&gt;&lt;br /&gt;        您的姓名:&lt;br /&gt;        &lt;input type="text" name="name1" size="20"&gt;&lt;br /&gt;&lt;br /&gt;        配對者姓名:&lt;br /&gt;        &lt;input type="text" name="name2" size="20"&gt;&lt;br /&gt;&lt;br /&gt;          &lt;input type="submit" value="送出" name="B1"&gt;          &lt;!-- disabled="disabled"--&gt;          &lt;input type="reset" value="重新設定" name="B2"&gt;&lt;br /&gt;      &lt;/form&gt;&lt;br /&gt;&lt;br /&gt;      &lt;h3&gt;&lt;font color="#FF0000"&gt;註: 此程式純粹為好玩而寫，&lt;i&gt;&lt;u&gt;&lt;b&gt;請不要太過認真！&lt;/b&gt;&lt;/u&gt;&lt;/i&gt;&lt;br&gt;        &lt;/font&gt;&lt;/h3&gt;&lt;br /&gt;      程式設計&lt;span lang="en-us"&gt;: slash@ms32.url.com.tw&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4643307613381918844-7769030168572848451?l=strokesgame.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://strokesgame.blogspot.com/feeds/7769030168572848451/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4643307613381918844&amp;postID=7769030168572848451' title='3 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4643307613381918844/posts/default/7769030168572848451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4643307613381918844/posts/default/7769030168572848451'/><link rel='alternate' type='text/html' href='http://strokesgame.blogspot.com/2008/11/blog-post.html' title='姓名筆劃測驗'/><author><name>俊緯</name><uri>http://www.blogger.com/profile/08798773938573625253</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry></feed>
