c++ - memset pointer + offset -


for example, have:

   dword pointer = 0x123456;    dword offset = 0xabc; 

i want add offset pointer , set value @ address pointed pointer 1.0f. how give memset() pointer , offset first argument?

dwords same uint32_t's. add them other integer.

also, while setting float (i assuming you're setting float due 'f' after '1.0'), wouldn't use memset. cast pointer float, , de-reference so:

dword pointer = 0x123456; dword offset = 0xabc;  pointer += offset;  float* float_pointer = reinterpret_cast<float*>(pointer); *float_pointer = 1.0f; 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -