[問題] c++ 2008 以buton 開啟.exe
各位好^^,我目前使用Visual C++ 2008 express
要以button 開啟電腦中的某一軟體
程式碼如下,我是將其寫在button中
private: System::Void button5_Click
(System::Object^ sender, System::EventArgs^ e)
{System("C:\Program Files\POV-Ray for Windows v3.6\bin\pvengine.exe");}
但是就是無法開啟@@
檔案路徑是用絕對路徑,有看到說絕對路徑 C: 後要用兩個反斜線 -> C:\\ ?!
但也都try了,還是不行呀!
到底是哪邊出了錯呢? 請各位指點一下,謝謝!
偵錯結果如下
1>------ 已開始建置: 專案: 碰撞程式介面, 組態: Debug Win32 ------
1>正在編譯...
1>碰撞程式介面.cpp
1>c:\Form1.h(182) : error C2882: 'System' : 運算式中命名空間識別項的不合法使用
1>已將建置記錄儲存於 "file://c:\Documents and Settings\seven\My Documents\Visual Studio 2008\Projects\碰撞程式介面\碰撞程式介面\Debug\BuildLog.htm"
1>碰撞程式介面 - 1 個錯誤,0 個警告
========== 建置: 0 成功、1 失敗、0 最新、0 略過 ==========
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.113.199.205
※ 編輯: gyseven 來自: 140.113.199.205 (05/15 18:48)
※ 編輯: gyseven 來自: 140.113.199.205 (05/15 18:54)
※ 編輯: gyseven 來自: 140.113.199.205 (05/15 19:05)
※ 編輯: gyseven 來自: 140.113.199.205 (05/15 19:06)
→
05/15 19:19, , 1F
05/15 19:19, 1F
推
05/15 19:34, , 2F
05/15 19:34, 2F
推
05/15 19:46, , 3F
05/15 19:46, 3F
→
05/15 19:56, , 4F
05/15 19:56, 4F
→
05/15 22:24, , 5F
05/15 22:24, 5F
推
05/17 14:24, , 6F
05/17 14:24, 6F
→
05/17 14:24, , 7F
05/17 14:24, 7F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章