为何不用指针而用数组[1]解决方法

为何不用指针而用数组[1]
调色板编程见到这样两个结构:
typedef struct tagPALETTEENTRY { // pe 
  BYTE peRed; 
  BYTE peGreen; 
  BYTE peBlue; 
  BYTE peFlags; 
} PALETTEENTRY;
typedef struct tagLOGPALETTE { // lgpl 
  WORD palVersion; 
  WORD palNumEntries; 
  PALETTEENTRY palPalEntry[1]; //???????????
} LOGPALETTE; 
有一段代码是这样写的:
LOGPALETTE *pLogPal=(LOGPALETTE*)new char[sizeof(LOGPALETTE)+N*sizeof(PALETTEENTRY)];
if(pLogPal != NULL){
  pLogPal->palVersion=0x300;
  pLogPal->palNumEntries=N;
  for(int i=0; i<N; i++){
  pLogPal->palPalEntry[i].peRed=Red;
  ...
  }
}
不知道Windows为何定义PALETTEENTRY palPalEntry[1]; 而不直接用PALETTEENTRY *palPalEntry; 
前者有何优势吗?


------解决方案--------------------
C/C++ code
因为数组有一个转换
lvalue->rvalue
也就是说数组名可以转换为对应的指针

struct _test_a_s
{
   char buff[1];
} a;

struct _test_b_s
{
   char* buff;
} b;
首先这里的目的是实现变长结构
b.buff引用到的是一个指针,而实际上想做的是向buff这个成员处写数据
于是就得成了(char*)&b.buff
而a的可以直接引用
下面的例子能说明问题
#include  <iostream>
#include  <cstring>
using namespace std; 

struct _test_a_s
{
    char buff[1];
};

struct _test_b_s
{
    char* buff;
};

int main(int argc, char* argv[]) 
{ 
    _test_a_s * pa = (_test_a_s*)malloc(32);
    _test_b_s * pb = (_test_b_s*)malloc(32);

    strcpy(pa->buff, "123456");
    /*strcpy(pb->buff, "123456");*/
    strcpy((char*)&pb->buff, "123456");
    cout << pa->buff << endl;
    cout << (char*)&pb->buff << endl;
    free(pb);
    free(pa);
    return 0; 
}