作者查詢 / bachelorwhc

總覽項目: 發文 | 留言 | 暱稱
作者 bachelorwhc 在 PTT [ C_and_CPP ] 看板的留言(推文), 共87則
限定看板:C_and_CPP
Re: [問題] 請問怎麼將類別打包成 dll 給客戶
[ C_and_CPP ]40 留言, 推噓總分: +4
作者: bachelorwhc - 發表於 2017/01/12 14:02(7年前)
3Fbachelorwhc: pimpl沒很難 只是在這個case沒必要01/12 14:42
4Fbachelorwhc: 對方的要求是要隱藏data member跟把繼承寫在cpp01/12 14:44
5Fbachelorwhc: 我覺得跟pimpl沒啥關係01/12 14:44
6Fbachelorwhc: pimpl我會拿去處理其他問題 尤其是runtime時期的變化01/12 14:45
7Fbachelorwhc: 還有跟policy組合01/12 14:46
8Fbachelorwhc: 個人見解01/12 14:46
15Fbachelorwhc: got it 這樣就可以明白了01/12 21:55
16Fbachelorwhc: 這樣不是回傳this 而是新的指標 用smart pointer不是01/12 21:55
17Fbachelorwhc: 即可解決問題?01/12 21:55
19Fbachelorwhc: 你那邊如果有auto_ptr 可以考慮用01/12 21:59
20Fbachelorwhc: 如果沒有的話 我會自己寫物件管理機制01/12 21:59
21Fbachelorwhc: 但有時物件小 其實我會考慮複製物件01/12 22:00
22Fbachelorwhc: 像你說的向量 我覺得到不用回傳指標01/12 22:00
23Fbachelorwhc: 實際上我是看生產物件的生命週期跟用途而定01/12 22:01
24Fbachelorwhc: 所以做法可能會差滿多的01/12 22:01
33Fbachelorwhc: @bluesoul 請問我前三份代碼跟pimpl差在哪? 我只用01/13 11:17
34Fbachelorwhc: 繼承多型就能夠處理這個問題01/13 11:18
35Fbachelorwhc: 我的疑問是原PO原文中的doSomething 我不知道他的意01/13 11:18
36Fbachelorwhc: 思 以為要回傳this 所以才提出用object pool解決生命01/13 11:18
37Fbachelorwhc: 期問題01/13 11:19
38Fbachelorwhc: 想請問 @bluesoul @uranusjr 我前三份代碼 哪裡沒隱01/13 11:20
39Fbachelorwhc: 藏實作? 我甚至不需要在父類別新增pimpl的data01/13 11:21
40Fbachelorwhc: member01/13 11:21
[問題] 請問怎麼將類別打包成 dll 給客戶
[ C_and_CPP ]27 留言, 推噓總分: +5
作者: noodleT - 發表於 2017/01/11 11:27(7年前)
3Fbachelorwhc: 你老闆要給對方的是abstract class 介面是return ptr01/11 15:41
4Fbachelorwhc: 這不需要什麼特別打包或撰寫技巧吧01/11 15:41
5Fbachelorwhc: 編譯出來後是static或dynamic library 除非逆向工程01/11 15:43
6Fbachelorwhc: 否則無法知道實作細節01/11 15:44
7Fbachelorwhc: 指標管理部分 如果你被要求給裸指標就直接給01/11 15:44
8Fbachelorwhc: 需要管理的就用smart pointer01/11 15:45
9Fbachelorwhc: 在windows的話 之後只要給對方.h跟.lib 編譯就能過01/11 15:45
10Fbachelorwhc: 實際執行期間就像你講的 動態連結dll 執行環境沒有01/11 15:46
11Fbachelorwhc: dll windows會自己警告01/11 15:46
[問題]CreateProcess:No such file or Directory
[ C_and_CPP ]7 留言, 推噓總分: +6
作者: HIAWIE - 發表於 2017/01/07 20:36(7年前)
5Fbachelorwhc: 超強01/09 00:27
[問題] 程式運行完之後自己關掉自己
[ C_and_CPP ]4 留言, 推噓總分: +1
作者: MOONY135 - 發表於 2016/10/22 00:04(7年前)
1Fbachelorwhc: 主執行視窗寫一個介面給其他人call10/22 01:18
2Fbachelorwhc: 不然就是用事件監聽的方法 來處理10/22 01:18
3Fbachelorwhc: 主程式會例行check事件的queue10/22 01:18
[問題] Visual Studio 要偵錯時存取被拒
[ C_and_CPP ]17 留言, 推噓總分: +6
作者: jh961202 - 發表於 2016/04/24 18:07(8年前)
2Fbachelorwhc: 會不會是防毒軟體太敏感 嘗試加入例外04/24 20:50
[分享] K&R 的 K 談 C 語言
[ C_and_CPP ]5 留言, 推噓總分: +1
作者: LPH66 - 發表於 2015/08/19 08:21(8年前)
1Fbachelorwhc: 後來有聽說 HelloWorld第一次出現並不是這本書08/19 10:59
2Fbachelorwhc: 只是K&R C太有名 久而久之大家就這麼認為了08/19 10:59
3Fbachelorwhc: 不過Hello, World確實是Brian Kernighan寫的沒錯08/19 11:01
[討論] 如何寫出一個史上最長的hello world
[ C_and_CPP ]39 留言, 推噓總分: +24
作者: jack710619 - 發表於 2014/06/15 00:21(10年前)
15Fbachelorwhc:很簡單 自己寫printf或cout06/15 11:14
Re: [問題] DevC++期末求助
[ C_and_CPP ]12 留言, 推噓總分: -1
作者: yuanyu90221 - 發表於 2014/06/12 23:11(10年前)
10Fbachelorwhc:不要害我沒生意做06/13 20:39
[問題] reverse串列問題
[ C_and_CPP ]6 留言, 推噓總分: +2
作者: oklp1415 - 發表於 2014/04/02 14:11(10年前)
1Fbachelorwhc:main must return int 已經說明很清楚 main必須是int04/02 16:08
2Fbachelorwhc:void 無法return 任何 value 定義明顯違反規則04/02 16:09
3Fbachelorwhc:reverse function必須先宣告,沒宣告 main當然不認得04/02 16:09
[問題] --i 和i--的不同
[ C_and_CPP ]14 留言, 推噓總分: +5
作者: yule1224 - 發表於 2014/03/12 00:50(10年前)
7Fbachelorwhc:Q2. 這兩個敘述的確沒有不一樣 你要知道電腦只認得數03/12 07:28
8Fbachelorwhc:字;可以去翻翻計算機組織或者自己轉型看看03/12 07:29