title: Friend member function without class declaration
body: <p>There is probably a really easy fix for this but it's boggling me currently. So, I'm writing C++ classes to the effect of:</p>
  
  <p>Header.h:</p>
  
  <pre><code>#pragma once
  //...
  class arrayObj
  {
  private:
     // some variables...
  public:
     //constructor, destructor, getters, etc...
     friend void objManager::foo();
  };
  //...
  class objManager
  {
  private:
     //...
     std::vector&lt;std::shared_ptr&lt;arrayObj&gt;&gt; array;
  public:
     void foo();
     //other methods...
  };
  </code></pre>
  
  <p>Now, as-is, my compiler will not find the class declaration of objManager (or the member function) declared for the friend inclusion. However, with the objManager declaration placed prior to the arrayObj, the arrayObj is no longer declared for the internal vector of shared pointers. Is there any way to forward declare objManager in this instance or otherwise solve this issue without dismantling the objManager into separate classes?   </p>