您的位置:首页 > 其它

Windows Server 2008 DHCP服务器的授权

2009-08-19 21:56 363 查看
// struct1.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
using namespace std;

struct student
{
char name[50];
float sorce;
student *next;
};

student *head;

void create()
{
student *ls;
student *le;
ls = new student;
le = ls;
head = NULL;
cout<<"Input name and sorce "<<endl;
cin>>ls->name>>ls->sorce;
while (strcmp(ls->name,"null") != 0)
{
(head == NULL)?head = ls: le->next = ls;

le = ls;
ls = new student;
cout<<"Input name and sorce again"<<endl;
cin>>ls->name>>ls->sorce;
}
le->next = NULL;

delete ls;
}

void showl()
{
while (head)
{
cout<<head->name<<"\t|\t"<<head->sorce<<endl;
head = head->next;
}
}
int _tmain(int argc, _TCHAR* argv[])
{
create();
showl();

system("pause");
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: