Advertisement
Guest User

Untitled

a guest
Nov 24th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. Matrix::Matrix()
  2. {
  3.     this->cols = cols;
  4.     this->rows = rows;
  5.     this->matrix = new float[this->cols * this->rows];
  6. }
  7.  
  8. float& Matrix::getElement(int x, int y)
  9. {
  10.     return matrix[this->rows x + y]
  11. }
  12.  
  13. Matrix::~Matrix()
  14. {
  15.     delete[] this->matrix;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement