求助,结构体问题
struct A{};
struct B
{
....
strcut A..
....
}
结构体A在结构体B内,已知结构体A的地址,如何利用函数求得结构体B的地址?
struct A{};
struct B
{
....
strcut A..
....
}
结构体A在结构体B内,已知结构体A的地址,如何利用函数求得结构体B的地址?
2007-11-12 21:22
2007-11-12 23:57
2007-11-12 23:58
2007-11-13 10:28
2007-11-13 11:16
2007-11-13 11:37
我测试了一下,测试程序如下:
#include<stdio.h>
#include<conio.h>
struct node
{
int i;
int j;
};
int main()
{
struct node st;
clrscr();
printf("%x %x",&st,&st.i);
getch();
}
结果是:
ffd4 ffd4

2007-11-13 11:43