Skip to main content

Posts

Showing posts with the label code

Constness of an object

Defining a function you might want to make some of it's arguments to be constant to avoid unnecessary copying or have a bit more strict interface. There is another way to use constness - there we meet constant class members.

Going up step by step

Have you ever wanted to be able to iterate through your own class as if it was a cool STL container?