-1
私は先週始まったC++の初心者です。私はいくつかのインチを足インチ表記に変換する簡単なプログラムを作成しようとしています。 62しかし、私がコンパイルしようとすると、私はライン8でいくつかのエラーを持って、私はそれが何であるかわからない。事前に感謝を。std :: stringstreamを使用すると予期しない結果が発生する
#include <iostream>
#include <sstream>
using namespace std;
string ConvertToFootInchMeasure (int totalInches){
string feet = ""+totalInches/12;
string inches = "" + totalInches%12;
stringstream converted;
conveted<<feet;
converted<<"'";
converted<<inches;
converted<<"\"";
return converted.str();
}
'string feet =" "+ totalInches/12;'と 'string inches =" "+ totalInches%12;はあなたが思っていることをしません。 –
どうしますか? – mtheorylord