類型名稱後面的括號是否與new有所不一樣? - Do the parentheses after the type name make a difference with new?

問題:

If 'Test' is an ordinary class, is there any difference between: 若是「測試」是普通類,則之間是否有任何區別: 測試

Test* test = new Test;

and spa

Test* test = new Test();

解決方案:

參考一: https://stackoom.com/question/2bKD/類型名稱後面的括號是否與new有所不一樣
參考二: https://oldbug.net/q/2bKD/Do-the-parentheses-after-the-type-name-make-a-difference-with-new
相關文章
相關標籤/搜索