Can I Allocate a specific memory address using pointers in c++?

后端 未结 4 1740
太阳男子
太阳男子 2020-12-02 01:43

Can I Allocate a specitic memory address using pointers in c++ ?

For example: Allocate This memory address 25D4C3FA and put 4 in it.

4条回答
  •  日久生厌
    2020-12-02 02:28

    You can request a specific address through VirtualAlloc on Windows, and I expect other operating systems do the same, but there are no guarantees and no platform-independent means.

提交回复
热议问题