COMPOSITION

Apr 17, 2017 at 7:42am
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 Apr 17, 2017 at 7:55am
Apr 17, 2017 at 8:13am
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 :+)
Apr 17, 2017 at 8:31am
Well, thank you, but I would need some practical examples, with the whole code, not only a prototype.
Apr 17, 2017 at 8:35am
Why don't you try something yourself - see how you go ?
Topic archived. No new replies allowed.