example11.4.cpp

来源:互联网 发布:数据库三大范式例题 编辑:程序博客网 时间:2024/05/18 00:45
#include<iostream>
using namespace std;
int main()
{
     struct lover
{
       int num;
       char name[10];
       int age;
   
       }beauty[2]={{1,"lily",22},{2,"chengfang",21}};
    struct lover *p;
    
    for(p=beauty;p<=beauty+1;p++){
                     
         printf("%-3d%-10s%4d",(*p).num,p->name,p->age);
         printf("\n");           
                     }
    
    system("pause");
    return(0);
    
    }

0 0
原创粉丝点击