Is there a way to hide private data members of a C++ class away from its users, in the cpp file? I think of the private members as part of the implementation and it seems a little backwards to declare them in the header file.
The "pimpl" idiom is how this is generally handled.
See
you want to use something like the PIMPL idiom
http://en.wikipedia.org/wiki/Opaque_pointer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With