I'm writing a program that output some values. Some of them are integers and others are doubles. I'm using the following function for the integer values:

char string[100];

int number=20;

_itoa( number, string, 10 );

SetDlgItemText(hWnd,IDC_OUT,string);

If I want to output a double (i.e. double number=2.55) the above function does not put the decimals.

Is there another function for doubles and floats?

Thanks,
Ruben