This is my first post - Hello everybody, hopefully you can help get on straight and narrow with regards to c++ Anyway on to question:
What I need to do this is to utilize the
constructor of one class in a second class - thereby optimizing the
code by avoiding duplication.
Take this example:
Constructor of first class:
Class1::Class1( void )
{
a = 0;
}
Instead of duplicating this I would like Class2 to use this same
constructor:
Class2::Class2( void )
{
//I would like code here that would pass an array to the Class1
constructor and if the array was 5 in size then each position in the
array would be initialized with a=0
}