Using stl containers like std::vector<MyClass> in class diagram and to generate C++ code

Hi Folks

I need to create UML class diagrams and then generate C++ code from that.
I need to use stl containers like std::vector for my own classes.
Specific example:
Class Person contains attribute std::vector which has an 0…* multiplicity to class Address.

I managed to define a custom type for my attribute in the Person class but I loose my aggregration to the Address class in the diagram.

How do I solve this?

Thank you for your time. Any help is appreciated.

Hi Nitroxleecher,

Are you using Instant Generator or Round-trip (Generate C++ Code… in menu)?
Round-trip by default will generate std::vector
image

And it can be configured in project option:
image

Hi Kit.So

Thanks a lot for the fast answer.
I must be doing something wrong then.
I will try to get to the same picture in the class diagram.

I’m happy to know it’s possible to do and it’s just me :blush:
Thank you for your help! Appreciated!