So, your question is how to specify the objective function for a quadratic
program. Please take a look here for a C++ example:
http://www.gurobi.com/documentation/7.0/examples/qp_cpp_cpp.html
You simply define a GRBQuadExpr and then call model.setObjective() with this
expression. You can build GRBQuadExpr objects step by step, like this:
GRBQuadExpr obj;
for (i = 0; i < n; i++) {
obj += alpha[i] * X[i] + alpha[i] * Y[i];
}
model.setObjective(obj, GRB_MAXIMIZE);
with alpha[], X, and Y being arrays of GRBVar objects.
Hope this helps,
Tobias