Why Isnt this working?
I'm tring to save some data to a file, in this case a D3DXVECTOR3, and I do the following
D3DXVECTOR3 vect( 1, 2, 3 );
ofstream out;
out.open( "Blah.txt" );
out << vect.x << '\n';
out << vect.y << '\n';
out << vect.z << '\n';
but the output in the file is:
-1.#QNAN
-1.#QNAN
-1.#QNAN
My methods of using "out <<" works for everything else, why not this?
EDIT:
Actually I have another question. If I can save data of the type 'enum' to a file, why can't I load it?
[edited by - Mulligan on December 23, 2002 6:49:33 PM]
Well, NAN means not a number so maybe the variables aren''t being set correctly. Try doing
vect.x = 1;
vect.y = 2;
vect.z = 3;
vect.x = 1;
vect.y = 2;
vect.z = 3;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement