i + name + letter + iをどのように連結できますか?C++でstring + int + stringをどのように連結できますか?
for(int i = 0; i < 10; ++i){
//I need a const char* to pass as a parameter to another function
const char* name = "mki";
//The letter is equal to "A" for the first 2, "B" for the second 3,
//"C" for the following 4 ...
const char* final_string = ???
}
私はすでに使用してみました:
std::to_string(i)
しかし、私は
to_stringには、私はVisual C++を使用していSTD
について定義されていないというエラーが発生しました。
使用 'のstd :: stringstream' – Ari0nhh
チェック[この回答](http://stackoverflow.com/questions/5590381/easiest-way-to-convert-int-to-string-in-c/ 5590404#5590404)を関連する(重複しない)質問に載せます。サムの答えのマクロ版。 – DevSolar