ShowElements calls InitializeElements which assigns random numbers to the internal array. ShowElements will never show the elements that exist when the function is called.
it would, but then when you have temp_prev show its elements, its gonna call initializeelements which is gonna over write all of the elements with the rand() call
But how to over come this,I need to access few elements from the previous instantation. Any pointers in that direction?
overload the ='s operator and have each class have a bool variable that is set to true when you do that and then when it comes to initializeelements run it only if the bool variable is set to false
Accurate, Thank you