示例:
template <typename T>
struct tNode
{
T Data;
list<tNode<T>*> SubNodes;
tNode(const T& theData)
{
this->Data = theData;
SubNodes(INIT_CAPACITY); //INIT_CAPACITY is 10
}
};
list<tNode<T>*>::iterator it(); //编译出错
typename
list<tNode<T>*>::iterator it //编译通过
网友评论