how to convert a string value to float or double?

i use atoi function but giving me integer value

sample code:



int main()
{