SO new to C++

This is a discussion on SO new to C++ within the C++ Programming forums, part of the General Programming Boards category; I feel bad submitting such a novice question but I really am having a hard time with this linked list ...

SO new to C++

I feel bad submitting such a novice question but I really am having a hard time with this linked list program I am working on. My main question is what I'm doing wrong on the function in red. As a side note, if you see anything else that I've done that is incorrect, please feel free to comment! I'm a good java programmer and am trying to learn C++. So if that background helps, feel free to use it! Thanks in advance for the help!

Okay so I skimmed, and you managed to implement LLRoot as a Node itself, not a Node *. In that case, you would need to return the address of LLRoot, by returning &LLRoot.

However, in my defense, it is impossible to get the error message you stated from the code you posted. If LLRoot is not a Node *, but a Node, as you have it defined, then trying to do *Node is a syntax error

Code:

error: no match for ‘operator*’ in ‘*((const LinkedList*)this)->LinkedList::LLRoot'

since you cannot follow a pointer if the thing you are trying to follow is not, in fact, a pointer.