Of course it doesn't work. You don't have the permissions to access the memory of another application. Also pointers are no absolute values but virtual ones. Just because you know the memory location of a certain value in one application, does not mean that you can use that same memory location inside another process to access the same value. There are so much things in place, beginning with
address space layout randomization (ASLR) and
virtual address spaces.
To get access to the memory of another process you first need to be root or an administrator on Windows, and then you first have to call an API to get access to another processes virtual address space, then you have to map your local memory addresses to the other processes memory locations using an API. And then you may can do what you want to do.
It's highly dependent on the operating system you're using.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.