I want to use malloc()/new to allocate 256KB memory to variable m. Then, use m to store data such as strings and numbers. My problem is how to save data to m and retrive them.
For example, how to store int 123456 in offsets 0 to 3 and read it to variable x? Or store "David" string from offset 4 to 8(or 9 with \0) and then, retrive it to variable s?