multiple typedef test
This commit is contained in:
@ -441,14 +441,21 @@ void enum_test()
|
|||||||
|
|
||||||
typedef int *my_ptr;
|
typedef int *my_ptr;
|
||||||
|
|
||||||
|
typedef int mytype1;
|
||||||
|
typedef int mytype2;
|
||||||
|
|
||||||
void typedef_test()
|
void typedef_test()
|
||||||
{
|
{
|
||||||
my_ptr a;
|
my_ptr a;
|
||||||
|
mytype1 mytype2;
|
||||||
int b;
|
int b;
|
||||||
|
|
||||||
a = &b;
|
a = &b;
|
||||||
*a = 1234;
|
*a = 1234;
|
||||||
printf("typedef:\n");
|
printf("typedef:\n");
|
||||||
printf("a=%d\n", *a);
|
printf("a=%d\n", *a);
|
||||||
|
mytype2 = 2;
|
||||||
|
printf("mytype2=%d\n", mytype2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void forward_test()
|
void forward_test()
|
||||||
|
|||||||
Reference in New Issue
Block a user