When constructing a C++ class a good practice is to never have any member variables in public scope and this includes containers. In this little article we will discuss how to have a C++ container as a private member and be able to expose its contents without exposing the container itself.
Continue reading “C++ Class: Accessing contents but not the container”