-
Recent Posts
Recent Comments
Categories
Links
Monthly Archives: September 2017
library使用注意macro define
在使用第三方函式庫時,要注意build library和use library(shared, static)的macro選項 例如: CURL_STATICLIB 或是header only選項 cppnetlib BOOST_NETWORK_NO_LIB 另外是注意編譯時的macro define,有可能使用時須要一致。 以後有注意到再繼續補
Posted in Tips
Leave a comment
int() = 0
顯式的使用 int() 會回傳0int a = int(); //a=0這個在語法上看起來「像」是constructor,而效果上也很「像」constructor (default value = 0) 那麼這個語法的值是怎麼被決定的呢?參考c++03 5.2.3 Explicit type conversion (functional notation) 的第二點 The expression T(), where T is a simple-type-specifier (7.1.5.2) for a non-array complete object type or the (possibly cv-qualified) void type, … Continue reading
Posted in C++ Language
Leave a comment