討論串[問題] 一般指標轉函數指標
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓2(2推 0噓 1→)留言3則,0人參與, 最新作者jhchou (jhchou)時間16年前 (2009/12/30 23:32), 編輯資訊
0
0
0
內容預覽:
剛剛寫了一隻小程式試了一下,. 先定義一個全域的函式. void fun(). {. cout<< 1 << endl;. }. 接著在main中. ThreadStart^ ts = gcnew ThreadStart(&fun);. Thread^ t = gcnew Thread(ts);.
(還有358個字)

推噓7(7推 0噓 10→)留言17則,0人參與, 最新作者tyc5116 (累人啊....)時間16年前 (2009/12/30 13:27), 編輯資訊
0
0
0
內容預覽:
貼一下部份的程式碼,再簡化一下... class ActTB{. public:. int ActID;. int ProcedureID;. void* ProcedureAdr;. };. array<Thread^>^ ThreadMove=gcnew array<Thread^>(10);.
(還有574個字)

推噓6(6推 0噓 8→)留言14則,0人參與, 最新作者tyc5116 (累人啊....)時間16年前 (2009/12/30 12:20), 編輯資訊
0
0
0
內容預覽:
如題,請問有辦法作到嗎,類似這樣(不過這不是實際的程式碼). void fun1();. void fun2();. class abc{. public:. int ID;. void* funptr;. }. 依VC++的Thread,參數須指定一個函數指標. 則. Thread(&fun1)
(還有96個字)
首頁
上一頁
1
下一頁
尾頁