VC6中结构体指针变量,给其它变量赋值不能用??? 急呀!
typedef struct {
unsigned int RecordID;
unsigned int NKFileNUM;
unsigned int NKFileWriteNUM;
unsigned int NKAllByte;
unsigned char TagFKFlag;
unsigned char PrintNKFlag;
unsigned char SendStopFlag;
}SeekBody_T;
SeekBody_T *pSeekBody=NULL; //全局变量
void SeekInit()
{
pSeekBody=(SeekBody_T*)malloc(sizeof(U8)*(60*sizeof(SeekBody_T)));
}
void SeekFunc()
{
unsigned int a = 0;
a = pSeekBody[3].RecordID;//当前pSeekBody[3].RecordID值等于4
//这条语句执行后a的值仍然是0
}
请问这是为什么呢?