掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
(.NET)std::string → System::String への変換 (ID:60418)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
普通に int main() { const char* p = "abcぜんかく"; std::string str = "ABC全角"; const wchar_t* wp = L"abcぜんかく"; std::wstring wstr = L"ABC全角"; System::String^ s1 = gcnew System::String( p ); System::String^ s2 = gcnew System::String( str.c_str() ); System::String^ s3 = gcnew System::String( wp ); System::String^ s4 = gcnew System::String( wstr.c_str() ); System::Console::WriteLine( s1 ); System::Console::WriteLine( s2 ); System::Console::WriteLine( s3 ); System::Console::WriteLine( s4 ); } で上手くいっているようだが。。。
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.