putting some class methods in different .cc file
<p>I have a bit of code of the following format contained in a single .h and .cc file:</p>

<p>myClass.h:</p>

<pre><code>#ifndef MYCLASS_H
#define MYCLASS_H
class myClass
{
public:
    myClass(); // constructor
    ~myClass(); // destructor

    void classMethod1 ();
    void classMethod2 ();

    int memberVarable1;
    int memberVariable2;
};
#endif
</code></pre>

<p>and myClass.cc:</p>

<pre><code>#include "myClass.h"
myClass::myClass(){
 // stuff
}

myClass::~myClass(){
 // stuff
}

void myClass::classMethod1 (){
 // stuff
}

void myClass::classMethod2 (){
 // stuff
}
</code></pre>

<p>All of this is working fine. However my project is getting quite large and I'm about to add a set of new functionality. Instead of clogging up myClass.h and myClass.cc I want to put some new methods in another .cc file. I don't seem to be able to get this to work though.</p>

<p>myClass.h:</p>

<pre><code>#ifndef MYCLASS_H
#define MYCLASS_H

#include "secondFile.h"

class myClass
    {
    public:
        myClass(); // constructor
        ~myClass(); // destructor

        void classMethod1 ();
        void classMethod2 ();

        int memberVarable1;
        int memberVariable2;
    };
#endif
</code></pre>

<p>and myClass.cc:</p>

<pre><code>#include "myClass.h"
#include "secondFile.h"
myClass::myClass(){
 // stuff
}

myClass::~myClass(){
 // stuff
}

void myClass::classMethod1 (){
 // stuff
}

void myClass::classMethod2 (){
 // stuff
}
</code></pre>

<p>secondFile.h:</p>

<pre><code>#ifndef SECONDFILE_H
#define SECONDFILE_H

void someNewMethod();

#endif 
</code></pre>

<p>secondFile.cc</p>

<pre><code>#include "secondFile.h"
void someNewMethod(){
 // can't see classMethod1()
}
</code></pre>
