matrix.h:21: error: ‘matrix operator++()’ must take either one or two arguments
matrix.h:22: error: ‘matrix operator--()’ must have an argument of class or enumerated type
matrix.h:22: error: ‘matrix operator--()’ must take either one or two arguments
matrix.h:21: error: ‘matrix operator++()’ must have an argument of class or enumerated type
matrix.h:21: error: ‘matrix operator++()’ must take either one or two arguments
matrix.h:22: error: ‘matrix operator--()’ must have an argument of class or enumerated type
matrix.h:22: error: ‘matrix operator--()’ must take either one or two arguments
Thank you for responding to my post. I want to make them friend functions, because my homework explicitly requires me to define increment and decrement operation as friend functions. Incrementing a matix means incrementing each element in the matrix by one.
In that case, the operator has to take one parameter if it is a pre-increment operator and two if it is a post-increment operator. The first parameter is a reference to the object and the second (for post-increment/decrement) is an unused int.