#include
using namespace std;
template
struct Nodelist
{
T date;
Nodelist *next;
};
template
class build_nodelist
{
public:
Nodelist *build(int n);
private:
Nodelist *first;
};
template
Nodelist *build_nodelist::build(int n)
{
Nodelist *p,*last;
last=first;
for(int j=0;j {
p=new Nodelist;cin>>p->date;
last->next=p;last=p;
}
return first;
}
int main()
{int n;Nodelist *b;
cout<<"qingshuruyuansugeshu:";
cin>>n;
build_nodelist a;
b=a.build(n);
b=b->next;
while(b->next!=NULL)
{
cout<date;
}
}