当我打印变量地址之间的差异时,我无法解决为什么我找到差异
这是代码:
int main()
{
int *a,b = 5,e = 0;
int *c,d = 10,f = 0;
long t1,t2;
a = &b;
c = &d;
e = &b;
f = &d;
t1 = e - f;
t2 = a - c;
printf("\n Address of b using a: %x \t %d using e : %x \t %d value of b : %d",a,a,e,e,b);
printf("\n Address of d using c: %x \t %d using f : %x \t %d value of d : …Run Code Online (Sandbox Code Playgroud) 我无法访问结构的成员
代码如下:
int main()
{
typedef struct tempA
{
int a;
}tempa;
typedef struct tempB
{
tempa **tA;
}tempb;
tempb.(*tA)->a =5;
printf("\n Value of a : %d",tempb.(*tA)->a);
}
Run Code Online (Sandbox Code Playgroud)
我试图使用它来访问它, tempb.(*tA)->a;但我收到语法错误:
Run Code Online (Sandbox Code Playgroud)error: expected identifier before ‘(’ token
访问的正确语法是int a什么?
提前致谢