Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2622197
  • 博文数量: 877
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 5921
  • 用 户 组: 普通用户
  • 注册时间: 2013-12-05 12:25
个人简介

技术的乐趣在于分享,欢迎多多交流,多多沟通。

文章分类

全部博文(877)

文章存档

2021年(2)

2016年(20)

2015年(471)

2014年(358)

2013年(26)

分类: LINUX

2014-07-24 10:39:26

#ifndef NAMES_ST_H
#define NAMES_ST_H

//常量
#define SLEN 32

//结构体声明
struct name_st
{
 char first[SLEN];
 char last[SLEN];
};

//类型定义
typedef struct name_st names;

//函数原型
void get_names(names *);
void show_names(const names *);
#endif // NAMES_ST_H
 

//doubinc1.c--两次包含同一个头文件
#include 
#include "names_st.h"
#include "names_st.h"

int main(void)
{
 names winner = {"Less","Ismoor"};
 printf("The winner is %s %s,\n",winner.first,
 winner.last);
 //printf("Hello World!\n");
 return 0;
}



 
                                   
阅读(467) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~