#pointer to unsigned type
25 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
unsigned int* isn't an int* that is unsigned, it's a * to an unsigned int
and yes, your pointer type needs to match what it's pointing to
ohhh
gotcha i was confused
so the value of * is just a signed int?
or is it an unsigned int
"the value of *" ??
I think technically they're neither, but in practice they're unsigned
what would a negative memory address mean
yea thats why im confused lol
so lets say i define a pointer
and i want to set it to a direct address
do i need to do like 0x....U?
no
but there are very few reasons to be manually defining an address like that
if you find yourself doing that, take a step back and consider what you're doing
yeah, "signed" and "unsigned" are only defined in the standard in relation to the integer types, not for pointers
does the address need to be unsigned as well
Have you ever seen a negative address?
So I don’t need the U?
Nope, I’m just confused why I need to use U when I do something like
#define regaddr 0x…..U