Original Post
Hey guys, I'm working with linked lists for the 1st time and I think I'm pretty close to getting the animation system of my 2d scroller finished but am having a bit of trouble. The problem lies in the loop I made to find a specific item in the list. I need to test if the current item in the loop exists or not. I tried comparing it to NULL with an error "error C2065: 'NULL' : undeclared identifier." I also did some research and saw that someone recommended using Nullptr so I tried that and it didnt work as well, gave the same error. I understand the error and what it means just not sure of what to test it against to get what I'm looking for here. Here's my code, I'm sure this is a quick fix but I cant seem to find a good reference for the problem.
FRAME_MASTER CFrames::Retrieve(int Action) {
FRAME_MASTER *Current = Last_Frame;
int x = 0;
for(x=0;(x<Frame_Directives && Current != NULL && Current->Action != Action); x++) {
Current = Current->Next;
}
return *Current;
}