The real difference between struct and class

“Should I use a struct or a class?”

Such is the question many C++ programmers ask themselves, or ask around to more experienced co-workers, when designing their code.

coding

There is sometimes a cloud of misconception about what the difference between struct and class technically is, particularly amongst the youngest developers. And once we get to understand the technical difference, some degree of uncertainty often remains about which one to use in a given context. Sometimes developers even disagree about which is the more appropriate in their code.
Continue reading