hi,
is there a way to convert double to string and return it from function like a string ?
Converting double to string in C
Converting double to string in C
Sorry for my bad english.
Re: Converting double to string in C
sprintf()
C provides the infinitely-abusable goto statement, and labels to branch to. Formally, the goto is never necessary, and in practice it is almost always easy to write code without it. We have not used goto in this book. -- K&R (2nd Ed.) : Page 65
Re: Converting double to string in C
Don't ever use sprintf(). Use snprintf(), introduced in ISO C99. Also, you can use string streams in C++.
Examples here:
http://libslack.org/manpages/snprintf.3.html
See Wikipedia for a description of buffer overflow with sprintf():
http://en.wikipedia.org/wiki/Printf#sprintf
Examples here:
http://libslack.org/manpages/snprintf.3.html
See Wikipedia for a description of buffer overflow with sprintf():
http://en.wikipedia.org/wiki/Printf#sprintf

