-
Recent Posts
Recent Comments
Categories
Links
Daily Archives: September 12, 2017
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