I\'m getting a incomplete type error for the \'next\' and \'previous\' variables. I\'m not sure what I am doing wrong because I am very rusty on writing classes in C++. An
Your members of type LinearNode are instances, which they aren't allowed to be in that context. Remember, in C++, if you declare "Foo f", that's not a reference to a heap object as in C#, but an instance of Foo right there on the stack or in your class layout.
Even worse, those two LinearNode instances would be instantiated when their containing instance is instantiated. And each of them has two child instances which would be likewise instantiated, and each of those has two... And so on, and so on, until you run out of memory. Naturally you're not allowed to do that, because it makes no sense.
So those have to be pointers or references. The reason is that the size of those two instances has to be known for the compiler to determine the size of the LinearNode class, but that size must be known before their size can be known.