⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c7-4.cpp

📁 这我们老师对是面向对象程序设计(清华大学出版社)一书制作的PPT
💻 CPP
字号:
#define NULL 0   
#include <iostream>
using namespace std; 
struct Student
 {long num;
  float score;
  struct Student *next;
 };
int main()
{Student a,b,c,*head,*p;
 a.num=31001; a.score=89.5;
 b.num=31003; b.score=90;
 c.num=31007; c.score=85;
 head=&a;
 a.next=&b;
 b.next=&c;
 c.next=NULL;
 p=head;
 do        
   {cout<<p->num<<"  "<<p->score<<endl;
    p=p->next;
   } while(p!=NULL);
 return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -