Fixed error in getOptV2

fixed error in cpp file and added output to main