typedef struct tagFileheader
{
    unsigned short   Type;                  //  00h  File Type Identifier
    unsigned int     FileSize;              //  02h  Size of bmp file
    unsigned int     PxOffset;              //  0Ah  Offset to bitmap pixel
}Fileheader;

Fileheader *pFileheader;
pFileheader = &Fileheader;

最佳答案

Fileheader是一种类型。所以&Fileheader没什么意思。运算符&的地址在实例上运行。您需要一个现有的对象:

typedef struct tagFileheader {} Fileheader;

int main(void)
{
    Fileheader fhdr;
    Fileheader *pFileheader;
    ....
    pFileheader = &fhdr;

    return 0;
}

08-24 19:07