Object of another class in another class member function
<p>I have following code:</p>

<pre><code>class A
{
public:
    A();

private:
    void slot();
};
</code></pre>

<p>The second class B looks like:</p>

<pre><code>class B
{
public:
    B();

private:
    // Some stuff...
};
</code></pre>

<p>In file1.cpp there are static objects of both classes:</p>

<pre><code>static A a;
static B b;
</code></pre>

<p>Now in file2.cpp(containing the class implementation) I would need in the slot function of <code>class A</code> the object <code>b</code>, which was created in file1.cpp. What is the best way to get it?
How is this done using C++?</p>
