vs2019
//创建一个类之后
class Matrix
{
int m_num0;
int m_num1;
public:
Matrix operator+=(Matrix& matrix);
}
//在资源文件里写
Matrix operator+=(Matrix& matrix) // operator这里报错
{
}
vs2019
//创建一个类之后
class Matrix
{
int m_num0;
int m_num1;
public:
Matrix operator+=(Matrix& matrix);
}
//在资源文件里写
Matrix operator+=(Matrix& matrix) // operator这里报错
{
}
class Matrix
{
int m_num0;
int m_num1;
public:
Matrix operator+=(Matrix &matrix);
};
//在资源文件里写
Matrix Matrix::operator+=(Matrix &matrix) // operator这里报错
{
}
作用域问题