Should I use struct or class C++?

use struct for plain-old-data structures without any class-like features ; use class when you make use of features such as private or protected members, non-default constructors and operators, etc.

Sizin İçin Seçtik  What does a class consist of?

Leave a Reply

Your email address will not be published. Required fields are marked *