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
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