ポインター演算を使用して構造体の特定のメンバーを出力する方法は? 私は2人のメンバーを持つ構造を持っています。j
その構造体へのポインタのメモリを操作してメンバーを出力したい。
#include <stdio.h>
#include <conio.h>
typedef struct ASD
{
int i;
int j;
}asd;
void main (void)
{
asd test;
asd * ptr;
test.i = 100;
test.j = 200;
ptr = &test;
printf("%d",*(ptr +1));
_getch();
}