Johnson & Johnson Interview Question

Three Sum and problems with C++ code