デバッグ目的で使用している文字列の印刷に問題があります。
次のように文字列を作成します。
//checker is int
std::stringstream buttonx;
buttonx << "Button" << checker << "_x";
今、私はそれを自分のerror.txt
ファイルに印刷しようとしています
FILE * p;
p = fopen ("error.txt","w");
fprintf(p, "%s" , buttonx.str());
fclose(p);
出力は次のとおりです。
,æ0
毎回違います。何が起こっているのか、誰かが間違いを説明できることを望んでいたかどうかはわかりませんか?