title: How to print out all constraints in Gurobi C++?
body: <p>I am using Gurobi now but the model turns out to be infeasible, so I am trying to print out all the constraints to see if I made mistakes. I know a few functions on how to print out the names of each constraint, but just couldn't find the final solution to print the constraints themselves(the mathematical expressions). </p>
  
  <pre><code>GRBConstr *c=0;
  c = model.getConstrs();  
  
  for(int i=0;i&lt;model.get(GRB_IntAttr_NumConstrs);++i){
      cout &lt;&lt; c[i].get(GRB_StringAttr_ConstrName) &lt;&lt; endl;
  }
  </code></pre>