掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
文字列を分解して直接std::stringに詰め込むに方法があるか? (ID:67300)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
// istringstreamを使った例 #include <iostream> #include <sstream> int main() { wchar_t input[] = L"input string"; wchar_t str1[8], str2[8]; std::wistringstream stream(input); stream >> str1 >> str2; std::wcout << L'[' << str1 << L']' << std::endl << L'[' << str2 << L']' << std::endl; }
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.