C++ undefined reference is a linker error that often may come up when the function is declared but not implemented. To solve make the name of a function the same in its function definition and function call.