Regarding: Child Class in a Array C++
<p><strong>Regarding: Child Class in a Array C++</strong></p>

<p>Hi guys, sorry as i am stuck on some work.</p>

<p>Basically this is what happen</p>

<p>I have a parent class call vehicle and it got 2 child class call </p>

<pre><code>Car and Motorcycle
</code></pre>

<p>Parent class have the following value:</p>

<pre><code>string Name: value either Car or MotorCycle
wheels : 4 or 2 (depends is car or motorcycle)
Notes On Wheel:
wheel[0] : Fine condition
wheel[1] : need some repair
wheel[2] : Fine condition
wheel[3] : Fine condition
</code></pre>

<p>I wonder how do i record this all in  VehicleTwoD Array</p>

<p>Car / Motorcycle is a child class of Vehicle, what do you guys suggest. I try to create an object of VehicleTwoD vehtwod[100];</p>

<p>then i do a for loop to prompt. but how do i record the object car / motorcycle into my VehicleTwoD array and how do i record the string array inside too. so every VehicelTwoD array element contains the information</p>

<pre><code>Name ( Motorcycle or Car)
Wheel ( depend on name - 2 or 4)
String array - notes size depend on what is choosen
</code></pre>

<p>How do i record all in 1 array.</p>

<p>Thank you very much , i know this is polymorphic and i know this is OOP and i know i need study more. but i really stuck on this part on creating such array that can hold other array.</p>

<p><strong>THANKS!</strong></p>
