title: stringList and string
body: <p>How Qt library solve problem with forward declaration of <code>QStringList</code> and <code>QString</code> classes. Both class have ability to manipulate with outer, if u call <code>QString::split()</code> it will return <code>QStringList</code> object, and in <code>QStringList</code> i have operator &lt;&lt; for adding <code>QString</code> objects...
  When I try to make my own class who will do same work i have error with 
  forward declarations...</p>
  
  <p>My header is:
  stringList.h:</p>
  
  <pre><code>#ifndef STRINGLIST_H
  #define STRINGLIST_H
  #include "monString.h"
  class stringList
  {
      public:
          stringList();
          virtual ~stringList();
          void insert(monString newString);
          void prikazi();
          int size();
          monString &amp; operator[](int offset);
      protected:
      private:
          stringList *slNext;
          monString *szString;
          int iOffset;
          static int iStringSize;
          stringList *lastNext;
  };
  #endif // STRINGLIST_H
  </code></pre>
  
  <p>and monString.h:</p>
  
  <pre><code>#ifndef MONSTRING_H
  #define MONSTRING_H
  #include &lt;iostream&gt;
  
  using namespace std;
  class stringList;
  
  class monString{
  private:
      char *dString;
      int dStringLongeur;
  public:
      monString();
      monString(char* newString);
      ~monString();
      operator char*();
      int sizeOfString()const;
      monString(const monString &amp;rhs);
      char operator[](int offset)const;
      char &amp; operator[](int offset);
      monString &amp;operator=(const monString &amp;rhs);
      monString operator=(const char * const newString);
      monString operator+(monString &amp;rhs);
      void operator+=(monString &amp;rhs);
      void splitString(char);
      void split(const char &amp;ch,stringList*);
      void isprazni();
  };
  </code></pre>
  
  <p>In function split(const char&amp;,stringList*) i have part of code stringList::insert, and on that line i have error:</p>
  
  <pre><code>monString.cpp|142|error: invalid use of incomplete type 'class stringList'
  </code></pre>
  
  <p>How can I solve this problem, and how Qt solved this...</p>