hi. I keep getting the invalid lvalue in assignment for the following code
The error state that &y = &x has error. am I doing something wrong here? I search on google about the reason of getting this error but none of them apply to me here.Code:void rbnode::rotate_left(rbnode *x) { printf("rotate left!\n"); rbnode *y = new rbnode(0, Red, NULL, NULL, NULL); &y = &x; x->right = y->left; if(y->left != NULL){ y->left->parent = x; } y->parent = x->parent; if(x == x->parent->left){ x->parent->left = y; } else{ x->parent->right = y; } y->left = x; x->parent = y; } // rbnode::rotate_left
thx for the help