C++如何往指定内存地址读写数据
我现在有一个结构体,如下所示:
typedef struct {
char name[50];
float x, y, z;
float speed;
float heading;
float pith;
float roll;
int color;
int health;
int entityType;
int force;
int id;
} BasicEntitydata;
现在我想把这个结构体获取到的数据,写入到指定的内存地址中,如0x1700000这种地址,该通过什么方法实现?
(LZ小白一个,希望各大神说的稍微简单些……多谢了哈~)