[juliantec_list] 自定义头文件中的条件编译

  • From: 姜华 <jh2012626@xxxxxxxxx>
  • To: app-dev-in-linux@xxxxxxxxxxxxxx
  • Date: Fri, 20 Jul 2012 14:55:05 +0800

在自定义的头文件中,有结构体,5个.c文件中都包含这个头文件。没有加条件编译为什么不出错,加上反而不能编译通过?
#include <stdio.h>

//#ifndef

typedef struct student
{
  int num;
  int mathmid;
  int mathend;
  float average;

} STU, *PSTU;

//#endif


struct stu
{
  int age;
};


int menu(void);

void In_stu(struct student **p);

void average(struct student **p,int n);

void Out_stu(struct student **p,int n);

Other related posts: