I am trying to implement a hash map I am using the chanining method for collisons ie all buckets point to a linked list of key value pairs,
anyway this implementation isn't the best but it's my first time implementing it, and that will be for a later question,
but for now I am getting an error that I just can't figure out
Hashing\main.cpp|85|error: no matching function for call to 'List<Pair<std::basic_string<char> > >::addNode(std::basic_string<char>&)'|
it says there is no matching function call BUT shouldn't the compiler handle this through templating and create an overloading function of this type, I've checked my code but fail to see why the compiler is complaning
also very true about the loops I've been studying C++ for 3 - 4 years on and off and I've never really learned modern C++ most tuts and books I've followed used C++98
Ah, then I highly recommend you upgrade your books.
Modern C++ (11 forward) is far superior on many levels, and moving to something this side of the 21st century is going to avoid wasting time and effort. A lot has happened to templates, the standard library, and C++20 is now gaining support among the current compilers - which offers yet another significant new level to templates (concepts).
I'd go so far as to say that if you delay, even a week, moving into more modern books, you are holding yourself back, especially if you view your approach as casual.
Stroustrup, lecturing on that particular point, has said that older C++ required too much "expert" effort, while the newer C++ features opens C++ up to less formal, more casual users (programmers). His observation is that while many are serious programmers (focusing on development as a primary occupation), the language has been opened for other professionals who merely need to write something for that field (say, a mechanical engineer who needs to control an engine).
So, in particular if your thinking is that the older C++ is better for curiosity and casual programming, you've missed the point of modern C++. The truth is the exact opposite. A lot of work went into making the work easier, more reliable, safer, less prone to bugs, with much greater power and much less writing.
Seriously, leave the 90's behind. Especially if you're "dabbling" - just experimenting, just playing. Modern C++ was intended for that (and a lot otherwise - plenty in modern C++ for the dedicated developers, too).
but wouldn't you agree that is also important to know C++98 as many older applications and older systems are implemented in legacy c++, If I was to ever get a role in a company that needed to debug or maintain older systems it would be almost essential to know right?
plus C++ has evolved so I would imagine it would be easier to transition to newer versions of the language rather than vice versa.
I would imagine it would be easier to transition to newer versions of the language rather than vice versa.
I find it easier to understand older versions of C++ when I have a grasp of newer, C++11 and later language features. Believing that learning older versions first makes it easier to learn newer C++ is as much a mistake as thinking to learn C++ one must learn C first. One of the 5 major myths of C++.
And if you want as up-to-date a reference for C++ as one can get online there is cppreference. Stinks at trying to learn from, but is THE source for non-beginners of what C++ (and C) has to offer.