General Struct question:

hey,

i've rarely used structs in c++, but want to use one now:

is the following a good way to create a struct?

1
2
3
4
5
            struct
            {
                Object* item1;
                Object* item2;
            }Pair;


Do I understand this kind of struct correctly?:
Pair will be the only object of this struct, and its not possible to create other objects?
Last edited on
Yes? In this case 'Pair' is the identifier, just like it would be with a class. The only difference between the two is the default data member accessibility.
Topic archived. No new replies allowed.