i dont think you can delocate that memory since you didnt dynamically created by using new keyword. Take my response with a grain of salt i'm just reading about pointers. I might be wrong.
No, there isn't any more.
Please write me the algorithm to eliminate the first element of a list. That's what i'm trying to do with my function.
Thank you for your prompt answer.
This is stomping all over the random piece of memory that first is pointing to; nod *first,*last; does not create two nod objects, it creates two pointers that could be pointing anywhere, and then you're writing into that memory.
If you try to delete first; , you'll have a problem, as you never allocated it with new