Original Post
Hi all, i've got a small but rather annoying problem, all doubles stored inside a xml file are truncated this for instance becomes: (0, 0, 148) when parsing while i'm using the following code I've been browsing to the c++ files of tinyxml, but ultimately parsing a double comes to a: #define TIXML_SSCANF sscanf_s call but somewhere along the route all its decimals places are getting truncated, anyone knows how this is happening, because i really don't have any clue, regards Paul [Edited by - PaulHolverda on September 1, 2009 9:16:12 AM]
if(sibbling)
{
double x, y, z;
sibbling->QueryDoubleAttribute("x", &x);
sibbling->QueryDoubleAttribute("y", &y);
sibbling->QueryDoubleAttribute("z", &z);
setPosition(Vector3d(x,y,z));
setPivot(Vector3d(0,0,0));
}
int TiXmlAttribute::QueryDoubleValue( double* dval ) const
{
if ( TIXML_SSCANF( value.c_str(), "%lf", dval ) == 1 )
return TIXML_SUCCESS;
return TIXML_WRONG_TYPE;
}