关于嵌套模板 有问题 ,请大家帮忙看一下
#include "stdafx.h"
#include <vector>
using namespace std;
#define NULL 0
template <class T>
struct octree
{
T xmax;
T xmin;
T ymax;
T ymin;
T zmax;
T zmin;
vector<int> point_index;
struct octree *next;
};
template <class T>
class MyList
{
public:
MyList()
{
root=NULL;
}
octree<T> *root;//指向根节点
bool empty();
void insertfront(octree *node);
octree<T> * popfront();
};
template <class T>
bool MyList::empty()
{
if(NULL==root)
return true;
else
return false;
}
template <class T>
void MyList::insertfront(octree<T> *node)
{
if( root==NULL)
root=node;
else
{
octree<T> *node1;
node1=root;
root=node;
(*node).next=node1;
}
}
template <class T>
octree<T> *MyList::popfront()
{
if(root==NULL)
return NULL;
octree<T> *node;
node=root;
root=(*root).next;
return node;
}
int main(int argc, char* argv[])
{
return 0;