I have two classes. In the first I create a node with left right pointers, a templated data member (<T> data;) and a int count;.
In my binary search tree class, when I do insert and find the word already there, I want to increment count by 1. (Count is defaulted to 1 in the constructor.)
Curr is the proper type (a node) but when I try to use the post or prefix operator, it never actually enters those functions. I can however change curr++ to curr.count+=1; and it works.
Is it not possible to call the increment overload from inside another class? do I need to friend that operator or something?