?????Щ??????????????????????????е???????????????Σ????????????洢????????SQL??????????????????????????????????????????????岢???????????????????????й?????

????????????????

?????洢???????????????壨??????????????????

struct analyse
{
int type;
};

?????????????????type????????SQL??????????type=1????alter table??????type=2????select??????type????3????create table????????????????????????в??????????洢????????磺

struct alter
{
int type??
int number??
char subtype??
......
......


};


struct select
{
int type??
char relnum??
long tablenum??
......
......


};

?????????????analyse??alter??select?е???????????????????????????????????????????????????????????ж?analyse?е?type?1??????????????struct alter???????struct alter?????????????ж?analyse?е?type?2??????????????struct select???????struct select??????????

??????????????????????????????????????????????????????????

???????????

????????????????????struct analyse?е?type?洢???????????????????????а???????????????????????洢?????????????

???????磬??????struct analyse?е?type?1???????????????struct analyse??????????????struct alter??????????洢??????????????int??char??????????struct analyse?е?type?2???????????????struct analyse??????????????struct select??????????洢??????????????char??long???

????????????????????????????struct analyse?????struct analyse?г???int type???????Щ??????????????????

????????С????

?????????????????С???????????????????????

struct A{
 int num;
};

struct B{
 int num;
 char type;
 int age;
};

int main()
{
 struct A a;
 a.num=1;

 char* tmp1=(char *)(&(a.num));
 tmp1=tmp1+4;
 *tmp1='a';
 int *tmp2=(int *)(&(a.num));
 tmp2=tmp2+2;
 *tmp2=100;

 struct B *b=(struct B *)(&a);

 printf(" b->num=%d  b->type=%c  b->age=%d "??b->num??b->type??b->age);
}