I am -- for practice's sake -- trying to make some sort of queue system with a simple linked list that have a queue entry structure (T value and next). I try upon adding the first element to see if there's already anyone there, but checking for a Entry* pointer existing has not proven easy.
I did so and they were added as usual, but when trying to use a simple peek function (get the next one, but not remove it) I get the magic number CDCDCDCD, which according to Wikipedia means uninitialized heap memory, do you know why? I think the problem lies within the peek() method.
Okay, now I assigned the value to it -- I should have noticed that really -- and now it returns a large number upon dereferncing in peek(). Why does it do that?