Going from ShaDoOoW's method, as Lightfoot's will only work with a set number of decimal places...
int decsAsInt(float val)
{
stringstream temp;
temp << val;
string Str1 = temp.str();
int pos = Str1.find('.');
Str1.replace(0, pos+1, "");
return atoi(Str1.c_str());
}
I hate wrestling with types in c++ too. There's probably a much nicer way to convert than using a stringstream, but if there is it's apparently a lot harder to remember
'>