#include <iostream.h>
typedef struct Object { char username[20]; double number; struct Object * next;
} NODE,*LPNODE;
int main(int argc, char* argv[]) { int number; LPNODE head=NULL,current=NULL,end=NULL; cout<<"Please input the number of records: "; cin>>number; for(int i=0;i<number;i++) { current=new NODE; current->next=NULL; cout<<"Please input the name of record "<<i+1<<" :"; cin>>current->username; cout<<"Please input the number of record "<<i+1<<" :"; cin>>current->number; if(head==NULL) { head=current; end=current; continue; } end->next=current; end=current; } for(current=head;current;current=current->next) { cout<<"The name is :"<<current->username<<"\n"; cout<<"The number is :"<<current->number<<"\n"; } return 0; }