#include <stdlib.h>
#include <iostream>
using namespace std;
typedef struct aaa *node ;
struct aaa
{
int value;
node next;
};
int main()
{
//ofstream write;write.open("1.txt");
//write<<1;
node head=(node)malloc(sizeof(struct aaa));head->value=711;head->next=NULL;
int i=1;int n=9;
while(n--){node t=(node)malloc(sizeof(struct aaa));t->value=i;i++;t->next=head;head=t;}
//reverse(a);
int j=1;
while(head){cout<<"结点 "<<j<<" = "<<head->value<<endl;head=head->next;j++;}
return 0;
}
联系客服