内のベクトルからデータを取得できませんすべてOKです含ん)私は状況を説明してみましょう、別のベクトル
vector<cAnimation> animation;
animation.resize(1);
animation[0].setQntFrames(10); // it's printing the right value on qntframes.txt
animation[0].setFrame(0,10,10,200,200) // it's printing the right values on setrect.txt
SDL_Rect temp = animation[0].getFrame(0);// here is the problem
ofstream log("square.txt");
log << "x = " << temp.x
<< "y = " << temp.y;
私はsquare.txtログに見ると、正方形のようないくつかの奇妙な文字が表示され、私はSDL_Rectの一時のデデータを使用しようとすると、アプリケーションはちょうど私がやっている、終了ここに間違っている値?
コードを単純なテストケースに減らす方法とその理由を確認するには、http://sscce.orgを参照してください。 –