看板 C_and_CPP 關於我們 聯絡資訊
開發平台(Platform): (Ex: Win10, Linux, ...) Visual Studio2013 問題(Question): 不好意思,小弟在網路上找到SetTimer的範例檔案 執行後測試成功,想要修改讓SetTimer去呼叫其他函數執行,修改之後發生錯誤 程式抓不到函數資料 想請各位大大幫小弟看一下程式是錯在哪裡還是說SetTimer不能這樣子呼叫函數 謝謝大家 預期的正確結果(Expected Output):s 可用SetTimer執行同一頁程式碼檔案的函數 錯誤結果(Wrong Output):s http://imgur.com/a/84JWp -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.163.38.217 ※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1495790889.A.81F.html ※ 編輯: rul3nk41 (1.163.38.217), 05/26/2017 18:16:03 ※ 編輯: rul3nk41 (1.163.38.217), 05/26/2017 18:16:27
aiwhat: 把 hello 放到 TimeProc 上面 05/26 18:26
aiwhat: 呼叫 hello 要加小括號 hello() 05/26 18:28
aiwhat: 還有 hello() 沒回傳東西給 cout 印 05/26 18:30
好的,謝謝您的回答 我後面新看了網路上的範例,發現是我犯蠢,增加onTimer就可以做到我的需求 現在已經解決了 感謝您的回答^^ ※ 編輯: rul3nk41 (1.163.38.217), 05/26/2017 18:47:49 ※ 編輯: rul3nk41 (1.163.38.217), 05/26/2017 18:48:46