title: Passing data into a c-string within a struct in a .h file from .cpp file
body: <p>I have a struct defined in a .h file. I must pass in info from the user from the .cpp file into a c-string within the struct. I'm not sure how. Any suggestions? 
  Code from employ.h file:</p>
  
  <pre><code>#ifndef EMPLOY_H_
  #define EMPLOY_H_
  
  #include &lt;iostream&gt;
  #include &lt;string.h&gt;
  #include &lt;cstdlib&gt;
  
  using namespace std;
  
  struct employ
  {
      const int nameLen = 30; //Length of name strings
      const int ssnLen = 11;  //Length of ssn string
      char firstName[nameLen];        //Employee first name
      char lastName[nameLen];     //Employee last name
      char midInit;           //Employee middle initial
      char SSN[ssnLen];           //Employee Social Security Number
      int hireDay,            //Day hired
      hireMonth,          //Month hired
      hireYear;           //Year hired
      double annSalary;       //Annual salary of employee
      long empNumber;         //Employee number
  };
  </code></pre>
  
  <p>Code from .cpp file:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string.h&gt;
  #include &lt;cstdlib&gt;
  #include &lt;fstream&gt;
  #include &lt;cctype&gt;
  #include "employ.h"
  
  using namespace std;
  
  void sort(employee*dbaseArray, int numEmps);
  void printEmps(employee*dbaseArray, int numEmps);
  void printOne(employee person);
  
  int main()
  {
      int numEmps;
      int count = 1;
      cout &lt;&lt; "How many employees are in the company? ";
      cin &gt;&gt; numEmps;
      if (numEmps &lt; 1)
      {
          cout &lt;&lt; "Sorry, that is an invalid number. Try Again: ";
          cin &gt;&gt; numEmps;
      }
      while (count &lt;= numEmps)
      {
              cout &lt;&lt; "What is employee's first name? ";
          cin.getline(firstName, nameLen);
      }
      return 0;
   }
  </code></pre>
  
  <p>Any help would be much appreciated.</p>