COMPOSITION

Hello everyone!
I'm trying to write a C++ program using object composition. My problem is that I didn't understand it very much, I searched online, but it's not clear enough.
So would you like to help me? I would need simple examples, with some sort of explanation about the code and, in particular, I would like to understand what I should do to manage to composed classes, where one contains an array of the other one and how I can fill the array.
Thank you in advance.
Last edited on
My problem is that I didn't understand it very much, I searched online, but it's not clear enough.


A search for wiki object composition found this:

https://en.wikipedia.org/wiki/Object_composition

I would have thought that was pretty clear :+)
Well, thank you, but I would need some practical examples, with the whole code, not only a prototype.
Why don't you try something yourself - see how you go ?
Topic archived. No new replies allowed.