<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="0.92">
<channel>
	<title>Harry's blog</title>
	<link>http://harry.cgtaiwan.com/index.php</link>
	<description>master c++</description>
	<lastBuildDate>Fri, 25 Apr 2008 06:20:06 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>vc8 下安裝 boost 1.35</title>
		<description>按照 boost 1.35 的 getting start 安裝, 只得到 release版的 dll library. 參照 bjam --hlep 後, 用以下指令可以得到完整的結果.

1. 解壓縮boost.zip 到  BoostRoot
2. build bjam : 執行BoostRoot\tools\jam\src\build.bat, 產生執行檔 BoostRoot\tools\jam\src\bin.ntx86\bjam.exe
3. 將 bjam.exe 複製到 BoostRoot
4. 開啟 Visual Studio 2005 命令提示字元
d:>cd BoostRoot
d:\BoostRoot>bjam --build-type=complete  --toolset=msvc  --prefix="d:\boost_output" install

完成後可在 d:\boost_output 目錄中看見所有的 include 及 lib 檔案
完成後可移除 BoostRoot\bin.v2 暫存目錄 </description>
		<link>http://harry.cgtaiwan.com/index.php/2008/04/25/vc8-%e4%b8%8b%e5%ae%89%e8%a3%9d-boost-135/</link>
			</item>
	<item>
		<title>繼承的二三事</title>
		<description>熟悉c++的人, 都知道要儘量謹慎使用多重繼承. 在Scott Meyers 的 effective c++(3e) Item 40有相關的說明. 那單一繼承呢?

STL 之父Alexander Stepanov 在這裏這麼說, "I think that object orientedness is almost as much of a hoax as Artificial Intelligence.", 對喜好OO的人來說, 一時還真不能接受. 但看看STL, 除了 iostrem, 幾乎看不到繼承. 在同篇文章中, 他評論java時, 也曾提過, java 保留了他不會用到的c++功能(繼承,virtual), 卻移除了他認為有用的功能.

再看看 Bjarne Stroustrup 怎麼說 "You try not to overuse inheritance. When ...</description>
		<link>http://harry.cgtaiwan.com/index.php/2007/02/10/%e7%b9%bc%e6%89%bf%e7%9a%84%e4%ba%8c%e4%b8%89%e4%ba%8b/</link>
			</item>
	<item>
		<title>c++ strings</title>
		<description>經常在無意間的討論中, 會有人提到對 std::string 的一些看法. c 語言底子深厚的人, 常無法擺脫對 char* 的熱愛, 覺得std::string的效能不佳. 慣用java的人, 又嫌std::string 的內建函數太少, 使用起來又常得借用c的字串函數, 不夠方便. 但從反方向看, char* 少了安全性, 而java 少了效率. std::string好像介於兩者中間?
真的是這樣嗎? c++ 是如何面對這種安全性及效率的取捨呢?

標準答案是, 兩者都不能少 :)

而這種"又要馬兒跑, 又要馬兒不吃草"的要求, 正是c++存在的最大意義. 於是許多對string  的最佳化技巧陸續被提出來. 如cow(copy on write), 又如避免動態分配記憶體, 到未來tr2提案書中的支援"move sementics" 的 string algorithm , 針對各種效率不彰的指控, 這些方法都一一的提出解答. 但這麼多種方法, 使用者如何決定用那一個呢? 又日後如何維護如此多種不同設計的strings ?
有一個不錯的選擇 :   					 ...</description>
		<link>http://harry.cgtaiwan.com/index.php/2006/11/02/c-string/</link>
			</item>
	<item>
		<title>Invariant</title>
		<description>The C++ Style Sweet Spothttp

這篇文章中 bjarne stroustrup 提及了何時不該用class, 以及如何判斷一個function 是否適合當作member function. 例如, find_next_sunday 就不適合放在'Date' class中.

這樣的概念, 在STL的 container - algorithm 中得到呼應. 把演算法丟到class中, 並不是物件導向.

在bjarne stroustrup 的"the c++ programming language" 也提過 Invariant(24.3.7.1), 但在這樣的大頭書中, 很多好的概念都隠藏在幾句簡單的話中, 容易被忽略. 常常是在日後某個時刻, 才想起當初簡單的話, 其實並不那麼簡單.....

寫c++筆記, 用來提醒自己, 一些好的概念, 是藏在那些書中. </description>
		<link>http://harry.cgtaiwan.com/index.php/2006/02/08/invariant/</link>
			</item>
</channel>
</rss>
