C???С????????????????????
???????????? ???????[ 2012/11/9 11:05:47 ] ????????
?????Щ??????????????????????????е???????????????Σ????????????洢????????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);
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11