Cpp Memory Manipulation