8 years, 1 month ago.

Where is gcvt() ?

I want to convert type double to char. I use gcvt() function. It's got problem :Error: Identifier "gcvtf" is undefined (E20). How to solve it ?

2 Answers

8 years, 1 month ago.

Hi Wei,

I'm not sure about gcvt, but can you just use sprintf (or snprintf)?

char str [80];
double num = 1.2345;
sprintf(str, "%f", num)

Hope that helps!

Brian

kesuwon cak !

posted by Naufal Fadhil 10 Jul 2018
5 years, 9 months ago.

/media/uploads/naufalboys/asd.png makasih mas wes iso programme, suwun pol yo !