how do i modify a value at an address?

To modify a value at a memory address you need a pointer in C.

unsigned long add_str2 is not a pointer, so you cannot use it as such.

Casting a number to a pointer is a mine field, as several systems use different sizes for different integers and pointers. For example, I’m currently working with a target system that uses pointers with 6 bytes width.

Avoid at all costs to convert numbers in pointers or back.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top