I trying to make a .hpp file but when I try to compile the compiler is throwing me errors with my constructor.
ok.
Screen shot:
second attempt...
>>50788357
.hpp is just a file extension. make sure you changed your includes and makefile.
>>50788369
You are assigning T to data in your default constructor. T however is not a value so you cant assign it. Its only a placeholder for a type.
Tyrone, stealing bikes is easier than compiling code you know ;^)
It looks like you're trying to warn the compiler that "data" is of type T. You don't need to do that, the compiler knows.
Think of "T" as being a literal copy-and-paste.
Programming 268 @KU? Dr. Gibbo?
>>50788357
mate, just pastebin the fucking code and the error message
>>50788380
You should probably read your book.
You don't compile header files (your .h files), change that in your Makefile so its just:g++ Node.cpp LinkedList.cpp -o test
Your .hpp files should be .cpp files for clarity, although it isn't causing any errors.
You're literally doing everything wrong when it comes to defining the template functions.