title: C++ Calling Private Data Members in a Vector Class
body: <p>I'm looking to create a class that's in the form of a standard vector. I've been writing some programs with classes that have implemented Sets and not vectors, so I'm a little confused.</p>
  
  <p>Here's my class: </p>
  
  <pre><code>class Employee
  {
  
  private:
  
    Struct Data
    {
  unsigned Identification_Number;
  // Current capacity of the set
  
  unsigned Department_Code;
  // Department Code of employee
  
  unsigned Salary;
  // Salary of employee
  
  str Name;
  // Name of employee
    }
  </code></pre>
  
  <p>If I want to call the private data members later on, can I just do the following? </p>
  
  <pre><code>vector&lt;Employee&gt; Example;
  
  //Assume there's data in Example
  
  cout &lt;&lt; Example[0].Identification_Number;
  cout &lt;&lt; Example[3].Salary;
  </code></pre>
  
  <p>If not, what would be an apprpriate container? Would a list of a list be better for handling this set of data?</p>