Anyone know a couple good online tutorials or resources for figuring out copy constructor and overloading = in a template class?
Last assignment of class is a simple array template class and I have enough of it done to meet the requirements to turn it in but would like to make the copy constructor and = work right. the copy constructor crashes the program the assignment operator i wrote only seems to copy the last element in the array so I currently dont have them in the template and I think that is ok for this assignment but I know it is bad form to not include copy constructor and overload = in a class with pointer variables
Thanks
Last assignment of class is a simple array template class and I have enough of it done to meet the requirements to turn it in but would like to make the copy constructor and = work right. the copy constructor crashes the program the assignment operator i wrote only seems to copy the last element in the array so I currently dont have them in the template and I think that is ok for this assignment but I know it is bad form to not include copy constructor and overload = in a class with pointer variables
Thanks