特定の部分文字列が検出された後、各行から外に出したいと思います。何とか私はissの5倍の出力を得ます。ここに私のコードは次のとおりです。 //load all data from txt
string data;
std::ifstream infile("SavedData.txt");
while (std::getline(infile, data)) {
プログラムは、入力された文字列と数字区切り文字を入力として取り出し、4つの単語を別々の行に出力する必要があります。 例 Please enter a digit infused string to explode: You7only7live7once
Please enter the digit delimiter: 7
The 1st word is: You
The 2nd word
残念ながらthisは、私が実装されるような例外をスローするソフトウェアを持っていますが、私はそれを避ける方法を知っておく必要があります... 有用ではなかったです。具体的な部分は次のとおりです。 if (!(iss >> c)) {
throw std::runtime_error(
"No return code: status line doesn't begin with