在使用结构体指针时出现编译错误, 同样的代码在VC++里编译对的,在vs2005的控制台C程序却编译错误。出错代码如下,大家帮帮忙啊,谢谢。
typedef struct BufNode
{
unsigned int DataLength;
char pData[1000];
} BufNode;BufNode* ReadBuffer()
{
if(CurABufSize==0)
return NULL; CurABufSize--;
         //出错行:error C2275: “BufNode”: 将此类型用作表达式非法
BufNode* tmpBufNode=&vDataBuffer[Read_Pos];
Read_Pos=(Read_Pos+1)%MaxSize; return tmpBufNode;
}