struct s1 { int a; int b; };
struct s2 { int a; int b; };
struct s2 test(void) {
struct s1 s = { 1, 2 };
return s; // incompatible types
}
上記のコードでs、新しいstruct s2変数を作成してsの値を入力せずに戻ることはできますか? struct s1は常に と同一であることが保証されていstruct s2ます。