title: Making a table with printf in c++
body: <p>I'm trying to make a table like this.... (Just without the dots I used to separate the each item)</p>
  
  <blockquote>
    <p>Weekly Payroll:</p>
    
    <p>Name.....................Title.......Gross......Tax......Net</p>
    
    <p>Ebenezer Scrooge       Partner    250.00   ..62.25  .187.75</p>
    
    <p>Bob Cratchit           ..........Clerk       ......15.00    ....2.00  ..13.00</p>
  </blockquote>
  
  <p>This is what my code looks like for this part....</p>
  
  <pre><code>for (int count=0; count &lt; numberOfEmployees; count++)
  {
      cout &lt;&lt; "Employee: \n";
      cout &lt;&lt; "\t Name: ";
      cin.getline (employees[count].name, EMPLOYEESIZE); 
  
      cout &lt;&lt; "\t Title: ";
      cin.getline (employees[count].title, EMPLOYEESIZE);
  
      cout &lt;&lt; "\t SSNum: ";
      cin &gt;&gt; employees[count].SSNum;
  
      cout &lt;&lt; "\t Salary: ";
      cin &gt;&gt; employees[count].Salary;
  
      cout &lt;&lt; "\t Withholding Exemptions: ";
      cin &gt;&gt; employees[count].Withholding_Exemptions; 
      cin.ignore();
  
      cout &lt;&lt; "\n";
  }
  
  
  double gross;
  double tax;
  double net;
  double adjusted_income;
  
  cout &lt;&lt; "\n";
  
  cout &lt;&lt; "Weekly Payroll: \nName \t \t Title \t Gross \t Tax \t Net \n";
  
  
  for (int count=0; count &lt; numberOfEmployees; count++)
  {
      gross = employees[count].Salary;
      adjusted_income = subtraction_times (employees[count].Salary, employees[count].Withholding_Exemptions);
      tax = adjusted_income * .25;
      net = subtraction (gross, tax);
  
      printf ("\n%s", employees[count].name); 
  }
  </code></pre>
  
  <p>I have the first part of the table(the name part), but after that I dont know now to do the rest of the table. Can anyone help me?</p>
  
  <p>Thanks</p>