title: C++ Nested classes driving me crazy
body: <p>i am trying to compile this very simple piece of code</p>
  
  <pre><code>class myList
  {
  public:
      std::vector&lt;std::string&gt; vec;
      class Items
      {
      public:
          void Add(std::string str)
          {
              myList::vec.push_back(str);
          };
      }items;
  };
  
  int main()
  {
      myList newList;
      newList.items.Add("A");
  }
  </code></pre>
  
  <p>what can i do to make this work without creating more objects that needed or overcomplicating stuff... </p>