typedef 문을 ,와 함께 쓰는 경우가 종종 있다
생각해 보면 의미는 당연한데 처음에는 좀 헷갈릴 수 있다
--------------------------------------------------
#include <iostream>
using namespace std;
typedef struct {
int a;
int b;
int c;
} mytype, *pmytype;
int main()
{
mytype var_a;
pmytype ptr_a;
ptr_a = &var_a;
var_a.a = 10;
var_a.b = 20;
ptr_a->c = 30;
cout << "values of var_a is " << ptr_a->a << " "
<< ptr_a->b << " " << var_a.c << endl;
return 0;
}
