how do i convert a string to a float?how do i convert a string to a float in c++? and whats the difference between float and double? thanks in advance.
Becouse no one else will help you: float thefloat; thefloat=atof(string); atof - C++ Reference ___ A float is not precies. if you do 10.0f/3.0f*3.0f = 9.9999999999999f But a float is smaller, so a double is bigger. (in memory usage) Type double is a floating type that is larger than or equal to type float, but shorter than or equal to the size of type long double.
use either sprintf or atof only offset appears with FSTP command are float (for example shotgun spread isnt float)