containers/ assignment operator

My docs on the vector class says it's compatible with classes that have copy contructers and assignment operators, how would I define these operaters, I think I know how to do the copy constructer but not the assignment one...

Something to do with not mixing the pointers up, I know. Just not familar with operator overloading. thx.

Both methods are similar. A copy constructor is a construtor that takes a reference to a class of the same type and simply copies the data from the argument to the local class. Most compilers will do a memberwise copy by default, but this is bad if you use anything but the basic types (int, char...)

An assignment operator does the same thing, only its done on a class that has already been constructed.