Structure as part of a class?

can you have a structure as part of a class?
inside my class i am working with two parallel arrays, so it would be better if i could have that data as a structure rather than two separate arrays.

if possible an example would be appreciated.
Yes.

1
2
3
4
5
6
class myclass {
    struct point {
        int x, y;
    } pt;
    std::string name;
};
ok thanks!
Topic archived. No new replies allowed.