|
예를들어
struct CLASS
{
struct CLASS * front;
struct CLASS * back;
int t;
} head,tail;
이렇게 써서 연결리스트를 구현할려고합니다.
물론 CLASS를 동적할당받아서 중간노드를 구성해야합니다.
그런데 헤드와 테일을 위처럼 안하고 걍 동적할당을 받더라구영.
struct CLASS
{
struct CLASS * front;
struct CLASS * back;
int t;
} *head, *tail;
이렇게 해서 나중에 malloc같은걸로 받더라구영.
이것들의 차이점좀 알려주세영.
|