Protoman wrote:
I'm getting a system error on this piece of code on WinXP:
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
volatile int* p=reinterpret_cast<int*>(0x59861);
for(int i=0;i<20;i++)
cout << *p << endl;
system("PAUSE");
return EXIT_SUCCESS;
}
Why does it keep crashing?
It probably has something to do with you trying to access a specific
address. Probably this address isn't a valid one, so your OS decides to
terminate your program.
And what's the mem address of the system clock for WinXP? Thanks!!!!
No idea. But under modern operating systems, you usually don't get direct
access to specific memory locations. On such OSs, the addresses you are
using are typically not even real memory addresses, but rather part of a
virtual address space created for your program. You're supposed to access
specific hardware through driver interfaces of your system. This is to
prevent programs from bringing the whole system down by messing up the
hardware.
How to do that, you best ask in a newsgroup about WinXP programming.