Hi everyone
Anyone know how to convert and pass value from a signed char array to a unsigned array ?
Hi everyone
Anyone know how to convert and pass value from a signed char array to a unsigned array ?
Hi onion Knight,
Actually I need to convert it because I had a function that take in unsigned char. Therefore when I need to use it with my signed parameter, it will always gave me a error message. That is why I wonder is there a way to convert it to unsigned value.
Code:int mf(unsigned char* inp); signed char arr[] = "Test"; mf((unsigned char*)arr);
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
It should just give a warning. But like vart demonstrates, you can just type cast it.
It is too clear and so it is hard to see.
A dunce once searched for fire with a lighted lantern.
Had he known what fire was,
He could have cooked his rice much sooner.
Thanks alot vart ..