I\'m trying to create different objects of the same type using a loop, and then storing a pointer to each specific object in a linked list. The problem is, each time an object i
This line
cout<<&user<
prints the address of a pointer to an object. user
is itself a pointer to the object you're creating. To print the address of your object, you meant to write
cout<
Although it'll be a new object each time, the variable user
is always in the same place. You can add the value of user
to your list, and it will indeed be different each time.