I've been using java for the last couple of months so i've just recently got back into C++ and I need to make a simple LinkedList class for a project. I believe everything is coded just fine it's just something in my main declared wrong. Here is my main:
I just went crazy and starting including everything. I even re did my program without templating and it still gave me the same error. The exact error is:Code:#include "Exception.h" #include "Exception.cpp" #include "LinkedList.h" #include "Node.h" #include "IndexOutOfBounds.h" #include <iostream> using namespace std; int main() { LinkedList<int> a; return 0; }
Main.cpp: In function `int main()':
Main.cpp:12: `LinkedList' undeclared (first use this function)
Main.cpp:12: (Each undeclared identifier is reported only once
Main.cpp:12: for each function it appears in.)
Main.cpp:12: parse error before `>'
The problem has to be in that bit of code but if you need the other files i can supply that. I have a feeling this is a very stupid problem caused from my time off. Thanks in advance guys.