|
|
|
|
|
by danjayh
4032 days ago
|
|
And why is this useful? Well, for high-level folks, pointers are used for roughly the same thing as reference variables in other languages. For low-level folks, sometimes you need to be able to read from / write to a specific address in memory. So if you have, for instance, a system clock device that always give you the current time if you read address 0x1234, you might do something like this: uint64 system_time; uint64 system_time_device = 0x1234; // A pointer to the system time device... system_time = system_time_device; // read the contents of the memory at address 0x1234 to get the time |
|