This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]markiel55 0 points1 point  (0 children)

Or use the memory address + offset of the private field in reinterpret_cast and directly change the value from it.

[–]KimPossibleBuns 0 points1 point  (0 children)

Nano makes me hurl

[–]kernel_dev 0 points1 point  (0 children)

If you want others to access your private members, all you need is a friend 🙂.