![]() |
changing datatypes
can a signed 'int', 'long' or 'double' datatype be changed int 'char'
without using any standard library functions... sudip |
Re: changing datatypes
"sudip chatterjee" <monarchofindia@hotmail.com> wrote in message news:828df4f5.0307230919.391ba559@posting.google.c om... > can a signed 'int', 'long' or 'double' datatype be changed int 'char' > without using any standard library functions... > > sudip Sure int i = 1; int l = 2; double d = 3; char c1 = i; char c2 = l; char c3 = d; is that what you meant? john |
Re: changing datatypes
On 23 Jul 2003 10:19:44 -0700, monarchofindia@hotmail.com (sudip
chatterjee) wrote: >can a signed 'int', 'long' or 'double' datatype be changed int 'char' >without using any standard library functions... > >sudip Sure, but you will have to use some function to do basically what itoa() and sprintf() do. You might even have write that function yourself. There is nothing magic in any of the standard library functions, just code. BTW - I am assuming you are trying to get a number formatted as a string, as accomplished like this: sprintf( psz, "%i", nNumberToFormat); </dib> John Dibling email: dib@substitute_my_full_last_name_here.com Witty banter omitted for your protection |
Re: changing datatypes
>
> int i = 1; > int l = 2; I meant to type long l = 2; john |
| All times are GMT. The time now is 06:00 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.