Exemplo n.º 1
0
 Matrix &operator=(const Matrix &s) {
     print_copy_assigned(this, std::to_string(m_rows) + "x" + std::to_string(m_cols) + " matrix");
     delete[] m_data;
     m_rows = s.m_rows;
     m_cols = s.m_cols;
     m_data = new float[m_rows * m_cols];
     memcpy(m_data, s.m_data, sizeof(float) * m_rows * m_cols);
     return *this;
 }
 void operator=(const ExampleMandA &e) { print_copy_assigned(this); value = e.value; }