_itot and _iota
-
i am not able to understant about these function so anybody tell me about these funtion. i want to know what is the purpose of these function because i have to implement these function in own way. Thanks & Regards Banks
-
i am not able to understant about these function so anybody tell me about these funtion. i want to know what is the purpose of these function because i have to implement these function in own way. Thanks & Regards Banks
-
i am not able to understant about these function so anybody tell me about these funtion. i want to know what is the purpose of these function because i have to implement these function in own way. Thanks & Regards Banks
From the DOCS: _itot(int ,_TCHAR* ,int ) value - Number to be converted string - String result radix - Base of value; must be in the range 2 - 36 _itoa(int ,char *,int) value - Number to be converted string - String result radix - Base of value; must be in the range 2 - 36 Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_
-
i am not able to understant about these function so anybody tell me about these funtion. i want to know what is the purpose of these function because i have to implement these function in own way. Thanks & Regards Banks
Use the following Generic-Text Routine Mappings if TCHAR.H Routine _itot if _UNICODE & _MBCS Not Defined _itoa if _MBCS Defined _itoa if _UNICODE Defined _itow Knock out 't' from can't, You can if you think you can :cool:
-
_itoa : function convert the digits of the given value argument to a null-terminated character string and stores the result (up to 33 characters for _itoa) in string. Cheers "Peace of mind through Technology"
i have to implement this function in other plateform not on windows and there is no spelling mistaques this is _itot and _iota not itoa. Thanks & Regards Banks
-
From the DOCS: _itot(int ,_TCHAR* ,int ) value - Number to be converted string - String result radix - Base of value; must be in the range 2 - 36 _itoa(int ,char *,int) value - Number to be converted string - String result radix - Base of value; must be in the range 2 - 36 Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_
I have to implement these function on other plateform not simply use these function so i want source code for these function not only syntax. Thanks & Regards Banks
-
I have to implement these function on other plateform not simply use these function so i want source code for these function not only syntax. Thanks & Regards Banks
What is the platform? I am providing the code for the operation of _itoa(*,**,10); * denotes integer variable ** denotes char*
char *convertinttochar(int num) { int ix=0; int jx=0; int kx=0; int xones=0; char xtemp[5]; char xans[5]; while (num!=0) { xones=num%10; xtemp[i]=(char)(xones+48); num=num/10; ix++; } for(jx=ix-1;jx>=0;jx--) { ans[kx]=temp[jx]; kx++; } ans[ix]='\0'; return (char *)ans; }
Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_ -- modified at 7:13 Friday 19th May, 2006 -
i am not able to understant about these function so anybody tell me about these funtion. i want to know what is the purpose of these function because i have to implement these function in own way. Thanks & Regards Banks
It should be easy enough to implement your own
itoa()
function. It simply converts an integer to a string. Go through each digit of the integer using the%
operator. If you have VC++ installed, you should already have the source to_itoa()
.
"The largest fire starts but with the smallest spark." - David Crow
-
What is the platform? I am providing the code for the operation of _itoa(*,**,10); * denotes integer variable ** denotes char*
char *convertinttochar(int num) { int ix=0; int jx=0; int kx=0; int xones=0; char xtemp[5]; char xans[5]; while (num!=0) { xones=num%10; xtemp[i]=(char)(xones+48); num=num/10; ix++; } for(jx=ix-1;jx>=0;jx--) { ans[kx]=temp[jx]; kx++; } ans[ix]='\0'; return (char *)ans; }
Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_ -- modified at 7:13 Friday 19th May, 2006i don't want code for itoa . i have to implement _itot(...). this function called on windows like this : _itot(++nNumber, szNumber + 1, 10); so can you explain me what is the purpose of this function _itot(...). Thanks & Regards Banks