English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Ive used itoa() function.. But it can only convert numbers upto 10 digits... What is the better function to use than this to input long double variable types rather than integer? Please help...

2007-02-16 20:25:00 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

I wanted to convert Numbers to Strings.... i need it in my program...

2007-02-16 20:32:04 · update #1

3 answers

Why not just use something like

#include string

string numbers;

numbers = 98431658736521876586;

Strings can be as long as you want them to be with the exception of white space and special characters. Why bother using the itoa() function in the first place?

2007-02-16 20:30:49 · answer #1 · answered by Anonymous · 0 1

enter the number as string.
or a digits array then use concatination.


to convert a string to a long number use
atol( )

to convert a string to a double number use
atof()

2007-02-17 07:31:12 · answer #2 · answered by iyiogrenci 6 · 0 2

you can use atol or strtol. if you program uses unsigned integers, you can also use strtoul

2007-02-17 04:38:23 · answer #3 · answered by Making_Happy 4 · 1 0

fedest.com, questions and answers