title: C++ String user input into Class Object?
body: <p>Let's say i have some class Employee ,and an object Director.
  For example :</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
   class Employee
  {
   public:
   string firsName;
   string lastName;
   int age;
  };
  
   int main()
  {
   Employee Director;
   Director.firstName = "Smith";
   etc....
  }
  
  etc...
  
  return 0:
  }
  </code></pre>
  
  <p>How i use a String input to let the user enter Director.firstName and etc. into the object?</p>
  
  <pre><code>cout&lt;&lt;"Enter Directors name: " &lt;&lt; endl;
  Director.firstName = getline(cin ,firstName);
  </code></pre>
  
  <p>Thank u very much in advance ! </p>