c语言 getch头文件,用getch()需要头文件吗?
該樓層疑似違規已被系統折疊?隱藏此樓查看此樓
#include
#include
#include "string.h"
#include
using namespace std;
struct student
{ int num;
char name[10];
char banji[10];
float score[3];
struct student *next;};
struct student *creat()
{struct student *head,*p1,*p2;
int i,n=0;char ch[20];
p1=(struct student*)malloc(sizeof(struct student));
cout<
getch();
gets(ch);p1->num=atoi(ch);getch();
cout<
gets(p1->name);getch();
cout<
gets(p1->banji);getch();
cout<
for(i=1;i<=3;i++)
cin>>p1->score[i];
head=NULL;
while(p1->num!=0)
{n+=1;
if(n==1)
head=p1;
else
p2->next=p1;
p2=p1;
p1=(struct student*)malloc(sizeof(struct student));
cout<
gets(ch);p1->num=atoi(ch);
cout<
gets(p1->name);
cout<
gets(p1->banji);
cout<
總結
以上是生活随笔為你收集整理的c语言 getch头文件,用getch()需要头文件吗?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 工行理财产品赎回要多少利息
- 下一篇: C语言整数加法器,【菜鸟解析】C++大数