[問題] constructor assignment與initializer

作者: ab18282099 (poppopjack)   2017-10-29 12:42:57
開發平台(Platform): (Ex: Win10, Linux, ...)
Win10
編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出)
VC++
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
小弟有以下疑惑:
C++的constructor可以用assignment和initializer兩種寫法,不知道有沒有大神能夠解釋或是說明什麼情況用initializer較佳或assignment較佳,感謝!
餵入的資料(Input):
預期的正確結果(Expected Output):
錯誤結果(Wrong Output):
程式碼(Code):(請善用置底文網頁, 記得排版)
補充說明(Supplement):
作者: loveflames (咕啾咕啾魔法陣)   2017-11-03 22:59:00
你是想問copy-init跟direct-init嗎

Links booklink

Contact Us: admin [ a t ] ucptt.com