and why not use assembly? and I only mean that it's faster and more direct.
Because he is trying to learn C/C++, not assembly.

i'm not sure why u would need to do that but it has been my exp. that c/c++ has no way to write data to a exat mem adderss because the os loads the program and then a var are offset to the start of the program
We already did it. See the above posts.

becuase im sure that there are other good reasons for accessing memory directly with a program in c++,like cleaning it same thing that reg edit does..
Like learning? Like understanding C/C++ on a deeper level? Like curiosity? Like it being part of the basic tutorial of C/C++ usage?