Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Accessing void * buffer/array through char * pointer
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="s0suk3, post: 3626296"] What is the advantage of using unsigned char over char? Why can it even invoke undefined behavior as vippstar said? I read somewhere that, if char happens to be signed, and if the variable will be used to hold 8-bit characters (i.e., a character whose value requires the use of the leftmost bit), it was better to use unsigned char if the variable would ever be used as an integer (otherwise we might end up with a negative value). Are there any other advantages other than that? And what's the deal with UB? Sebastian [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Accessing void * buffer/array through char * pointer
Top