I am trying to overload the + and - operator for my class Collect
class Collect is an array of movies (class Movie) so i need to add a movie to the array and subtract a movie from the array.
the only way i know how to do code this (and i know its wrong) is:
Collect Collect::operator+(const Collect& c) const {
Collect add;
add.director=director+c.director; \\string
add.title=title+c.title; \\string
add.genre=genre+c.genre; \\string
add.length=length+c.length; \\int
add.rating=rating+c.rating; \\string
add.release=release+c.release; \\string
return add;
}
which should work if i was just adding ints or doubles....any help is greatly appreciated