lz,是输出8啊~~~~~
先改正一下你程序里的错误~~~
#include<iostream.h>
#include<stdlib.h>
#include<string.h>
class stu
{
public :
int name ;
stu *next;
stu()
{
name=100;
next=NULL;
}
};
#include<iostream.h>
#include<stdlib.h>
#include<string.h>
class stu
{
public :
int name ;
stu *next;
stu()
{
name=100;
next=NULL;
}
};
stu* input(stu* &top)
{
cout<<"please input name:"<<endl;
stu *p2,*p1;
p2=new stu;
top=0;