0

Hi :)

anyone can help me for my problem

1) how to convert 'unsigned char' to 'unsigned int' ...
2) need more idea about casting for embedded c

after making some calculation , value from char typed array element are changed some unknown value which can't be handled.

Wanna know ........... :(
help me to solve it out...
thanks in advance :icon_razz:

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by ithelp
0

You mean something like:

unsigned char a = '0';
unsigned int b =a;

'b' will now be 48. That's the ASCII-value of '0' (zero)

Edited by Nick Evan: n/a

0

Hi :)

anyone can help me for my problem

1) how to convert 'unsigned char' to 'unsigned int' ...
2) need more idea about casting for embedded c

after making some calculation , value from char typed array element are changed some unknown value which can't be handled.

Wanna know ........... :(
help me to solve it out...
thanks in advance :icon_razz:

There is no need to convert by default unsigned char will be promoted to unsigned int .

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.