1. int main(void
  2. struct  aa{ 
  3. int a; 
  4. char b; 
  5. aa *next; 
  6. }; 
  7. aa a1, a2, a3; 
  8. a1.a = 30; a1.b = 'p'
  9. a2.a = 40; a2.b = 'q'
  10. a3.a = 50; a2.b = 's'
  11. a1.next = &a2; 
  12. a2.next = &a3; 
  13. a3.next = 0; 
  14. aa *tail; 
  15. tail = &a3; 
  16. for (;;) 
  17. int x, char y; 
  18. printf("enter (integer, character)\n"); 
  19. scanf("%d %c", &x, &y); 
  20. if (x == 0) break
  21. aa *temp; 
  22. temp = new aa; 
  23. temp->a = x; temp->b = y; temp->next = 0; 
  24. tail->next = temp; 
  25. tail=tail->next; 



저 for문이 이해가 안가는데요


특히 어떤 부분이 이해가 안가냐면 aa *temp인데요


동적할당을 해준다는것까진 이해가 되는데


for문에 의해서 aa *temp가 계속 만들어지잖아요


사실상 aa *temp


 aa *temp aa *temp aa *temp aa *temp aa *temp aa *temp


이런식으로 계속 같은 변수를 생성하게 하는거 아닌가요?


그런데 어떻게 새로운 node가 계속 생겨나나요?


분명히 제가 무언가 잘못이해하고 있는것 같은데 도움좀 주세요.


마지막에 tail->next = temp;  tail=tail->next; 


이것도 잘 이해가 안가네요


ㅠㅠ