Solves the Ackley and Knapsack problem in C++