mirror of
https://review.haiku-os.org/buildtools
synced 2025-02-14 17:57:39 +01:00
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29033 a95241bf-73f2-0310-859d-f6bbb57e9c96
24 lines
289 B
C
24 lines
289 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
int main ()
|
|
{
|
|
struct base {
|
|
int basic;
|
|
};
|
|
|
|
struct derived {
|
|
struct base common;
|
|
char extra;
|
|
};
|
|
|
|
struct derived d;
|
|
struct base *bp;
|
|
|
|
bp = (struct base *)&d;
|
|
|
|
bp->basic = 10;
|
|
((struct derived *)bp)->extra = 'x';
|
|
return 0;
|
|
}
|