求助熟悉delphi的兄弟, Pascal 和C++的对应写法!

如下 pascal 语句

type
PPacket = ^TPacket;
TPacket = packed record
case Integer of
0: (b0, b1, b2, b3: Byte);
1: (i: Integer);
2: (a: array[0..3] of Byte);
3: (c: array[0..3] of Char);
end;

对应成如下c++,请问是否对?另外上面 Pascal 的case Integer of 是否对应C++的构造函数?

struct TPacket
{
Byte b0, b1, b2, b3;
int i;
Byte a[3];
char c[3];
};

[440 byte] By [kmfangxun] at [2008-6-5]
# 1
type
PPacket = ^TPacket;
TPacket = packed record
case Integer of
0: (b0, b1, b2, b3: Byte);
1: (i: Integer);
2: (a: array[0..3] of Byte);
3: (c: array[0..3] of Char);
end;
===================================
typedef union{
struct{
unsigned char b0;
unsigned char b1;
unsigned char b2;
unsigned char b3;
};
struct{
int i;
};
struct{
unsigned char a[4];
};
struct{
char c[4];
};
}TPacket,*PPacket;
# 2
其实上后面的struct可以省去

typedef union{
struct{
unsigned char b0;
unsigned char b1;
unsigned char b2;
unsigned char b3;
};
int i;
unsigned char a[4];
char c[4];
}TPacket,*PPacket;
# 3
typedef union{
struct{
unsigned char b0;
unsigned char b1;
unsigned char b2;
unsigned char b3;
};
int i;
unsigned char a[4];
char c[4];
}TPacket,*PPacket
# 4
汗……
# 5

多谢多谢各位!看了半天书,不如在这问一下,呵呵!
kmfangxun at 2007-10-22 > top of Msdn China Tech,C++ Builder,基础类...