Removed error function definition from main.cpp