Answer the question
In order to leave comments, you need to log in
Is it better to represent the nodes of a tree structure as instances of a class or structure?
Actually, the question is higher. I know the differences between classes and structures, but maybe there is some logic, what is the best way to describe tree nodes, an instance of a structure or class?
Answer the question
In order to leave comments, you need to log in
In C++, there is exactly one difference between a class and a struct: data in a struct is public by default, while data in a class is private. So there is no fundamental difference (from my point of view)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question