Hi, I get this error when I try to compile my code. Unfortunately I can't post it since its a hw assignment. Could someone explain what it means?
Thanks
1 2 3 4
/tmp/ccmd73ST.o:main.cpp:(.text+0x13d): undefined reference to `HashMap<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>::HashMap()'
/tmp/ccmd73ST.o:main.cpp:(.text+0x14b): undefined reference to `HashMap<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>::~HashMap()'
collect2: ld returned 1 exit status
Okay I did a template class and separated each part into .cpp and .h and In int main() i did #include".h" however I kept getting the error so I did #include".cpp" and it works fine. I dont understand why but it works.