I want to get the value from a memory address which I have without crashing the program.
here is my code:
int main(){
int *ptr=(int*)0x09D37570;
while(1){
system("cls");
cout<<(*ptr);
}
return 0;
}
but that crashes the program, it crashes by calling *ptr, why does that happen? how can i get the value without problems?
Every process has its own memory space, the same address in different processes maps different physical address, so it is meaningless to do like that.