Why Isnt this working?

Started by
1 comment, last by Mulligan 21 years, 4 months ago
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]
Advertisement
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;
Thats bizarre, thanks!

This topic is closed to new replies.

Advertisement