implementing constructor
Hi,
I am learning implementations nowadays and I have problem about that. For example here is my code;
1 2 3 4 5 6 7 8 9 10
|
Matrix(int r1, int c1): r(r1), c(c1) {
corner = new Mnode();
Mnode* ptr = corner;
for(int i = 0; i < c - 1; i++) {
Mnode* ptr2 = new Mnode();
ptr->right = ptr2;
ptr = ptr2;
}
|
Constructor of the class Matrix. I do not know when I should write like Matrix() or Matrix::Matrix() is it about namespace, I am so much confused.
Thanks in advance!
edit= I understood something like this: it is about free and member function. But nevertheless I need a clarification
Last edited on
Topic archived. No new replies allowed.