728x90
반응형
1. main.c
#include "test1.h"
void h_Test(void);
test1 test2 = {10,11};
test1 *test3;
void main(void)
{
test3 = &test2;
printf("test\n");
h_Test();
}
void h_Test(void)
{
printf("test3 a = %d\n", test3->a);
}
2. test1.h
#include <stdio.h>
typedef struct
{
int a;
int b;
}test1;
728x90
반응형
'공부 > C언어' 카테고리의 다른 글
14. 구조체 기본 (0) | 2018.10.18 |
---|---|
13. typedef enum (0) | 2018.07.11 |
11. static void 의 쓰임 (0) | 2018.05.25 |
10. __VA_ARGS__ 의 쓰임 (0) | 2018.05.24 |
9.[C언어] 구조체 typedef (0) | 2018.04.03 |