0
typedef struct _node btree_node;

struct _node
{
	int* keys;
	btree_node* children;
	int count_keys;
	int is_leaf;
	btree_node* parent;
	int position_in_parent;	
};

I am getting this error:

error: no match for ‘operator=’ in ‘*(node->_node::children + ((long unsigned int)(((long unsigned int)(i + degree)) * 40ul))) = 0l’
note: candidates are: _node& _node::operator=(const _node&)

for this line of code:

node->children[i+degree] = NULL;

I failed to explicate the reason behind this.

Note: I used g++ to compile this. How to change things to compile without error for g++?

Edited by johndoe444: n/a

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by gerard4143
0

I figured my stupid silly mistake. children[i+degree] is not a pointer. What punishment do you suggest to give johndoe for such a moronic act?

1

I figured my stupid silly mistake. children[i+degree] is not a pointer. What punishment do you suggest to give johndoe for such a moronic act?

How about getting you to post this in the C++ section

Note: I used g++ to compile this. How to change things to compile without error for g++?

Edited by gerard4143: n/a

Votes + Comments
Yes
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.