Object created in for-loop has same address
问题 I'm trying to make an own list-class which is of a fixed size and can store integers. Just for learning purposes. This is how I do it: I have a struct called Item which holds the data (the integer to store), and a pointer to the next item in the list. When the list gets initialized I first add x amount of empty Items to the list. The address of item declared in iteration (n-1) is stored in a buffer, so that the address of the item in iteration n, can be set as next for the item in the