请教一个关于C语言字符数组的问题
//setError.h
#ifndef _SETERROR_H_INCLUDED_
#define _SETERROR_H_INCLUDED_
char ALARM[2] = {
/* 0 */"000 Can not open file!", // 文件没有打开
/* 1 */"001 File write error!" // 文件写入错误
};
#endif
#include<stdio.h>
#include"setErrorC.h"
main()
{
printf ("%s", ALARM[0]);
return 0;
}
使用VC++6.0编译,出现如下错误:
--------------------Configuration: SetError - Win32 Debug--------------------
Compiling...
SetError.c
g:\出错记录\seterrorc.h(7) : warning C4045: '000 Can not open file!' : array bounds overflow
g:\出错记录\seterrorc.h(9) : warning C4045: '001 File write error!' : array bounds overflow
g:\出错记录\seterrorc.h(9) : error C2078: too many initializers
执行 cl.exe 时出错.
SetError.obj - 1 error(s), 0 warning(s)
不知道是什么原因,哪位大侠可以指导一下呢?