Tree Template Class Implementation for C++ I have not done any parameter checking, however I think the meat of the class is there.  Let me know what you think.  

#include &lt;cstddef&gt;
#include &lt;vector&gt;
using namespace std;

template&lt;class T&gt;
class TreeNode {

private:

    T* data;
    TreeNode&lt;T&gt;* parent;
    vector&lt; TreeNode&lt;T&gt;* &gt; children;

public:

    TreeNode(TreeNode&lt;T&gt;* parent, T data);
    ~TreeNode();

    T&amp; getData() const;
    void setData(const T&amp; data);
    void addChild(const T&amp; data);
    void removeChild(const size_t&amp; indx);
    TreeNode&lt;T&gt;* findChild(const T&amp; data) const;
    TreeNode&lt;T&gt;* getChild(const size_t&amp; indx) const;
    TreeNode&lt;T&gt;* getParent() const;
    int getNumChildren() const;

};

template&lt;class T&gt;
TreeNode&lt;T&gt;::TreeNode(TreeNode&lt;T&gt;* parent, T data) : parent(parent) {
    this-&gt;data = new T(data);
}

template&lt;class T&gt;
TreeNode&lt;T&gt;::~TreeNode() {
    delete data;
    for(TreeNode&lt;T&gt;* childNode : children)
        delete childNode;
}

template&lt;class T&gt;
T&amp; TreeNode&lt;T&gt;::getData() const {
    return *this-&gt;data;
}

template&lt;class T&gt;
void TreeNode&lt;T&gt;::setData(const T&amp; data) {
    *this-&gt;data = data;
}

template&lt;class T&gt;
void TreeNode&lt;T&gt;::addChild(const T&amp; data) {
    children.push_back(new TreeNode&lt;T&gt;(this, data));
}

template&lt;class T&gt;
void TreeNode&lt;T&gt;::removeChild(const size_t&amp; indx) {
    children.erase(children.begin()+indx);
}

template&lt;class T&gt;
TreeNode&lt;T&gt;* TreeNode&lt;T&gt;::findChild(const T&amp; data) const {
    for(int i=0; i&lt;children.size(); i++)
        if(children[i]-&gt;getData() == data)
            return children[i];
    return NULL;
}

template&lt;class T&gt;
TreeNode&lt;T&gt;* TreeNode&lt;T&gt;::getChild(const size_t&amp; indx) const {
    return children[indx];
}

template&lt;class T&gt;
TreeNode&lt;T&gt;* TreeNode&lt;T&gt;::getParent() const {
    return parent;
}

template&lt;class T&gt;
int TreeNode&lt;T&gt;::getNumChildren() const {
    return children.size();
}
Do not get in the habit of using using namespace std.
Since you're using &lt;cstddef&gt; for size_t, you should make it std::size_t for C++.
Since you define your own destructor, you should also overload the copy constructor and the assignment operator.  This is known as The Rule of Three in C++.  This is especially important in the case of raw pointers as data members as the compiler-provided copy constructor and assignment operator will only copy the pointer (shallow copy), not the data (deep copy).

You should also follow Dieter's advice (in the comments): use T data instead of T* data, and remove thenew/delete.  Use as little manual memory allocation as possible in C++.
You're using a range-based for-loop in the destructor, which must mean you're using C++11.  Bearing this in mind, one change you should make is using nullptr instead of NULL.