I am trying to write a getFirst function within a linked list code that will return a pointer to the first object in the list however I am getting an undeclared identifier when trying to use a variable I have used previously and am unsure why it does not work in my new code.
error: use of undeclared identifier 'start'
return *start;
You need to specify the class when defining the function, otherwise the compiler will think you are trying to create a global function that is not part of any class.