Write Through the Pointer

Easy

Fix writeValue so it stores the new value through the pointer instead of into a local copy. The program should print the updated health and mana values. Once the output is correct, read the assembly panel and find the lea instruction in main that loads a variable's address to pass it, and the store through that address inside writeValue: a mov with a bracketed register destination like DWORD PTR [rax].

Success Criteria

Your code must pass 1 test case(s) to complete this exercise. 3 hint(s) are available if you need help.

Sign in to track your progress

You can work on exercises as a guest, but sign in to track your progress and save your submissions.

This platform is built by its community

Every lesson, project, and tool on HelloC++ is funded by sponsors. Join them and help shape what we build next.

Become a Patron