c++ find the column number(index) that have maximum sum of i