static_cast 的語法: static_cast <type_name> (expression) ... 因此這裡是向上轉換,合法 Low *pl = static_cast<Low *>(&bar); //bar是基類,pl是派生 ...
確定! 回上一頁