Okay, so I'm working on a sorted linked list but instead of manually creating variables and then adding it, I wanted to make a simple user interface so I can add it when I run the program. The create takes a void pointer and the list. So inside my switch in main:
x is a void pointer, num is an int.
Code:
case 2:
scanf("%i",&num);
x=# /*I even tried casting it with (void*)*/
insert(list,x);
break;
Say I insert 5 first and then 10. I keep getting 10, 10 when I print the list...yet when I manually added them with different void variables, I get 10, 5. I tried doing insert(list,(void*)&x); and I keep getting the same thing. Someone, help a nub in C.

If not, I'll just create new void and int variables and assign the ints to the void pointer with a void cast...