On 18 Aug 2003 06:08:52 -0700
la******@yahoo.com (Joseph Suprenant) wrote:
I have an array of unsigned chars and i would like them converted to
an array of ints. What is the best way to do this? Using RedHat 7.3
on an Intel Pentium 4 machine. Having trouble here, hope someone can
help
Thanks
unsigned char srcarray[] = {1,2,3,4,5,6,7,8,9};
int arraysize = sizeof srcarray;
unsigned int dstarray[arraysze];
int elem;
for (elem=0; elem < arraysize; elem ++)
dstarray[elem] = srcarray[elem]
looks pretty pointless...
Can you post some approximation of what you want in the form of, say, source
code? I doubt this is it.
--
char*x(c,k,s)char*k,*s;{if(!k)return*s-36?x(0,0,s+1):s;if(s)if(*s)c=10+(c?(x(
c,k,0),x(c,k+=*s-c,s+1),*k):(x(*s,k,s+1),0));else c=10;printf(&x(~0,0,k)[c-~-
c+"1"[~c<-c]],c);}main(){x(0,"^[kXc6]dn_eaoh$%c","-34*1'.+(,03#;+,)/'///*");}