私は次のものを持っています:
char op; double x, y, z;
istringstream iss("v 1.0 2.0 3.0", istringstream::in);
iss>>op>>x>>y>>z;
しかし、x、y、z の値を出力すると、それらはすべて 0 を返しますか?
アップデート:
私はそれが働いていると思いますが、私はそれを次のように出力しています:
int length=wsprintf(result," V is %d, %d, %d ", x, y, z);
TextOut(hdc,0,0,result,length);
正しい値が表示されません。
ただし、次のように値が int の場合は正常に機能します。
char op; int x, y, z;
istringstream iss("v 1 2 3", istringstream::in);
iss>>op>>x>>y>>z;