C++で、以下のようなプログラムを動かそうと思ったのですが、
System::ComponentModel::Win32Exception noBrowserのnoBrowserの部分にエラーが出ます。
エラー内容は、「'*': この間接指定を型 'System::String' で使用できません」というものです。
C++初心者で、解決の糸口がつかめないのですが、どなたか教えて下さい。
#using <mscorlib.dll> #using <system.dll> #using <System.Windows.Forms.dll> int main() { //Use no more than one assginment when you test this code. //System::String *target = "http://www.microsoft.com"; //System::String *target = "ftp://ftp.microsoft.com"; System::String *target = "C:\\Program Files\\Microsoft Visual Studio\\INSTALL.HTM"; try { System::Diagnostics::Process::Start(target); } catch (System::ComponentModel::Win32Exception *noBrowser) { if (noBrowser->ErrorCode == -2147467259) System::Windows::Forms::MessageBox::Show(noBrowser -> Message); } catch (System::Exception *other) { System::Windows::Forms::MessageBox::Show(other -> Message); } return 0; }
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/06/21 10:07