This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to make a pointer point to a constant string in RAM

I'm using Keil3 for arm.
1\I wanna change the string's content,eg from "2007" to "2008"
2\I wanna a pointer ,not a array,to point to the string.
But when I do as follows:
char *ptr = "2007";
ptr is in the flash area,so I cann't change the content of the string "2007" .

0