I get the error at "TD<T> tree;" and I'm still really new to template programming in C++ so I don't have any idea of anything I can do to fix it -sorry I keep asking very similar questions - anybody?
I'm also getting an error that cout isn't defined in the scope of one of my methods even though I'm using the std namespace in my program (this is all in one header file), all the other questions I've seen only tell the asker that he should include the namespace so I'm kind of lost here too
Just a note, you should not use namespaces in headers.
What are you trying to do on line 8? If you're trying to instantiate the template you made in the lines before, then you should remove line 7 and replace T in line 8 with a type, like so: std::vector<int> an_integer_vector;
As for the cout problem, are you remembering to #include <iostream>? Just to make sure.
Actually I don't want to instantiate the template in line 8
I want to keep the type generic while creating a variable of that type.
Come to think of it though the variable I'm trying to create isn't really necessary since I pass the variables I use in my methods as parameters anyway so don't worry about it
Thanks about the <iostream> bit :) - missed that and I feel like a complete idiot because I keep missing the small things