#ifndef_FUNC_H
#define_FUNC_H
/自定义获得两个整数中的最小值/
int min(int a,int b)
{
return a>b?b:a;
}
/自定义获得两个整数中的最大值/
int max(int a,int b)
{
return a>b?a:b;
}
#endif
#include <stdio.h>
#include "func.h"
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("a,b中%d是小的数字\n",min(a,b));
printf("a,b中%d是大的数字\n",max(a,b));
return 0;
}
这个怎么改,为什么显示:[Error] invalid preprocessing directive #if
[Error] invalid preprocessing directive #define_FUNC_H
13 2 [Error] #endif without #if
15 [Error] func.h: No such file or directory
compilation terminated.
DEV中
#ifndef _FUNC_H
#define _FUNC_H