I promise this will be my last question here - but I'm getting this error on all the lines where I use the '->' symbol, 5 in all and they're the last 5 in the program (hopefully).
TD<T> tree and ND<T> node are pointers to the NODE<T> and TREE<T> structures of the tree and root, size, left, right, and colour are some of the elements in them (the elements I want to initialize - I have a data variable of type T in the node structure but I initialize it elsewhere).
> malloc(sizeof(struct node))
that makes no sense. There is no class called `node' (¿or is it?)
Maybe you intended to write malloc(sizeof(ND<T>))
However, given that `colour' is an std::string and you do have a member of type T, you should call the node constructor so its member are constructed properly node = new ND<T>();
Then you may realize that you are modifying a local parameter, which would not have any effect except for leaking memory
Should I post the whole program then? Sorry, most forums prefer if I post less code so that they'd have less to go over and I'm new to a lot of things here.