Is there any advantage over using a class over a struct in cases such as these? (note: it will only hold variables, there will never be functions)
class Foo {
private:
struct Pos { int x, y, z };
public:
Pos Position;
};
Versus:
struct Foo {
struct Pos { int x, y, z } Pos;
};
Similar questions:
- When should you use a class vs a struct in C++?
- What are the differences between struct and class in C++?
- When should I use a struct instead of a class?