c语言 问题error C2059: syntax error : 'constant'

开头定义 N 2,M 1的时候是正常的,想改两个数字就不对了。。。 #define N 10 #define M 5 出来:c:\program files (x86)\microsoft visual studio\vc98\include\winnt.h(5441) : error C2059: syntax error : 'constant' c:\program files (x86)\mic... 定义 N 2 M 1 候 想改两 数字 #define N 10 #define M 5 :c:\program files (x86)\microsoft visual studio\vc98\include\winnt.h(5441) : error C2059: syntax error : 'constant' c:\program files (x86)\microsoft visual studio\vc98\include\winnt.h(5441) : error C2238: unexpected token(s) preceding ';' 定位 东西看 懂 T.T WINNT.H : typedef struct _IMAGE_SYMBOL { union { BYTE ShortName[8]; struct { DWORD Short; // if 0, use LongName DWORD Long; // offset into string table } Name; PBYTE LongName[2]; } N; (定位 啊 T.T) DWORD Value; SHORT SectionNumber; WORD Type; BYTE StorageClass; BYTE NumberOfAuxSymbols; } IMAGE_SYMBOL; typedef IMAGE_SYMBOL UNALIGNED *PIMAGE_SYMBOL; 展开

解决
#define
N
10



包含
文件include语句

位置
建议
要用宏
const
int
N=10;
N

替换
10代码变
typedef
struct
_IMAGE_SYMBOL
{
union
{
BYTE
ShortName[8];
struct
{
DWORD
Short;
//
if
0,
use
LongName
DWORD
Long;
//
offset
into
string
table
}
Name;
PBYTE
LongName[2];
}
10;
(定位

T.T)
温馨提示:答案为网友推荐,仅供参考
相似回答