[C++] 機考題目
Post Views: 3,410 Checked or unchecked exceptions JAVA Serialization Smart Pointer Design Pattern JAVA Threading (synchronized) Split strings Comparison among
詳細內容想方涉法, France, Taiwan, Health, Information Technology
Post Views: 3,410 Checked or unchecked exceptions JAVA Serialization Smart Pointer Design Pattern JAVA Threading (synchronized) Split strings Comparison among
詳細內容Post Views: 16,133 傳統上記憶體的管理主要利用 new 跟 delete 來進行,但是在指標傳遞的時候常常會不知道何時應該要釋放記憶體? 所謂「Smart Pointer」是幹嘛的呢?基本上,他是一種用來模擬傳統的 pointer、提供一些附加功能的特殊資料型別;比較常見的功能,主要就是透過自動資源回收(automatic garbage collection)的機制、來進行記憶體管理了。 針對以下三種 C++11 支援的 smart pointer 做整理: 1.
詳細內容Post Views: 2,037 繼承的分類: 1. 公開繼承(public): 子成員只能使用父類別中宣告為 public/protected 的函式(function)與成員(member),但是不能夠 class A{ public: int one; protected: int two; private: int three;
詳細內容Post Views: 2,128 static_cast(exp) function 可以將 exp 轉換成 new_type,但是不能夠確保轉換一定會成功,upcasting 一般可以成功,但是 downcasting 則需要確認是否轉換失敗。 struct B {}; struct D : B {};
詳細內容