小编赏心悦*_*心悦目的帖子

如何在C中编写头文件

我是新手,我正在学习C语言.编译以下代码时出现错误.

Constans.h

#define ERROR 0   
#define TRUE 1  
#define FALSE 0  
#define OK 1  
#define INFEASIBLE -1  
#define OVERFLOW -2  
typedef int Status;  
Run Code Online (Sandbox Code Playgroud)

ArrayList.h

#include"Constans.h"  
#define LIST_INIT_SIZE 100  
#define LIST_INCREMENT 20  
typedef struct{  
int *elem;  
int length;  
int listsize;  
}SqList;  
extern Status InitList_sq(Sqlist *l);  
extern Status ListInsert_sq(Sqlist *l,int i,int e);  
extern Status ListDelete_sq(Sqlist *l,int i,int *e);  
extern void MergeList_sq(Sqlist La,Sqlist Lb,Sqlist *Lc);  
extern void ListTraverse(Sqlist l,void(*visit)(void));  
Run Code Online (Sandbox Code Playgroud)

program.c

#include<stdio.h>  
#include "ArrayList.h"  
int main(){  
return 0;  
}  
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

我的环境:
操作系统:Mac OS X 10.9.1版本 …

c macos header-files

-4
推荐指数
1
解决办法
137
查看次数

标签 统计

c ×1

header-files ×1

macos ×1