I know with pointers you can do this:
T * myPtr = 0;
which sets the pointer to a NULL value. However, when I try to do this:
T * myPtrArray[2] = {0, 0};
I get the "expected expression" syntax error. Why?
Note, I'm using g++ and the code above occurs in a class constructor:
template <class T>
RBTree<T>::RBTree() {
m_Data = T();
m_Children = {0, 0};
m_Parent = 0;
m_Color = BLACK;
}
where the class members in question are declared as:
T m_Data;
RBTree<T> * m_Children[2];
RBTree<T> * m_Parent;
bool m_Color;