Char* array to Unsigned Char* 
Author Message
 Char* array to Unsigned Char*

Sorry Typo error ;P
I mean this:-

   char *image;
   unsigned char *uImage;

So what happens when I typecast like this:-

   uImage=(unsigned char*)image;

Thanks alot :)

Quote:


> > I would like to know what exactly would happen when I typecast a
> > char* array to unsigned char*.

> > char *image;              // Malloc already !
> > unsigned char* *uImage;
>                ^ ^

> > ....
> > uImage=(unsigned char*)image;

> What you did there was to put a char * into an unsigned char **.
> There are two stars between char and uImage above.  The above cast
> is wrong as well.

> --
> Widget whizz is a free program for making X toolkit widget templates.

> See http://www.*-*-*.com/



Thu, 05 Jul 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Sorting a Huge Unicode File use strcmp(unsigned char *, unsigned char *)

2. Sorting a Huge Unicode File use strcmp(unsigned char *, unsigned char *)

3. Sorting a Huge Unicode File use strcmp(unsigned char *, unsigned char *)

4. char, unsigned char, signed char

5. Converting char array of literals chars to escape chars

6. A char pointer (char *) vs. char array question

7. bytes to unsigned char, unsigned short, unsigned int, ...

8. NewBie: difference between char* and unsigned char*

9. copying unsigned long into char[4] or char*

10. char* or unsigned char*?

11. char* and unsigned char*

12. (char *) to (unsigned char *)

 

 
Powered by phpBB® Forum Software