C++ unordered_map using a custom class type as the key

I am trying to use a custom class as key for an unordered_map, like the following: #include <iostream> #include <algorithm> #include <unordered_map> using namespace std; class node; class Solution; class Node { public: int a; int b; int c; Node(){} Node(vector<int> v) { sort(v.begin(), v.end()); a = v[0]; b = v[1]; c = v[2]; } … Read more

Undefined reference to vtable

When building my C++ program, I’m getting the error message undefined reference to ‘vtable… What is the cause of this problem? How do I fix it? It so happens that I’m getting the error for the following code (The class in question is CGameModule.) and I cannot for the life of me understand what the … Read more

usr/bin/ld: cannot find -l

I’m trying to compile my program and it returns this error : usr/bin/ld: cannot find -l<nameOfTheLibrary> in my makefile I use the command g++ and link to my library which is a symbolic link to my library located on an other directory. Is there an option to add to make it work please? 14 s … Read more