title: How to you find out what group the current user belongs to via c++?
body: <p>Using my c++ program how can I find out what group the current user running my program belongs to? So my program need to figure out a couple of things :</p>
  
  <ol>
  <li>The current username of the user</li>
  <li>The group the user belongs to</li>
  </ol>
  
  <p>How can do the above 2 using c++ on a RedHat / Linux machine?</p>