How ptr arithmitic works??? It doesn't make any sense....

ag0aep6g anonymous at example.com
Sun Dec 4 16:40:17 UTC 2022


On Sunday, 4 December 2022 at 16:33:35 UTC, rempas wrote:
> First a little bit of theory. A pointer just points to a memory 
> address which is a number. So when I add "10" to this pointer, 
> it will point ten bytes after the place it was pointing to, 
> right?

Not quite. Adding 10 to a T* means adding 10 * T.sizeof.



More information about the Digitalmars-d-learn mailing list