I hate to state this again, but I am still having trouble with moving the operator functions to non-member non-friend. I moved them back to global friend functions so that I could test other parts of the code. It all seems to work fine with the functions as global friends like this

Code:

class Matrix
{
friend Matrix operator+=(Matrix &, const Matrix &); //overload +=
friend Matrix operator+(Matrix, const Matrix &); //overload +
friend Matrix operator*=(Matrix &, double); //overload *=
friend Matrix operator*(Matrix, double); //overload *
friend Matrix operator/(Matrix, double); //overload /
friend std::ostream &operator<<(std::ostream &, const Matrix &); //print a matrix

But as soon as I move one or all of them to non member non friend like so

Code:

Matrix operator+=(Matrix &, const Matrix &); //overload +=
Matrix operator+(Matrix, const Matrix &); //overload +
Matrix operator*=(Matrix &, double); //overload *=
Matrix operator*(Matrix, double); //overload *
Matrix operator/(Matrix, double); //overload /
class Matrix
{
friend std::ostream &operator<<(std::ostream &, const Matrix &); //print a matrix

I get a huge amount of syntax errors all over the code. I don't see why it's not working.