A small test confirms that it is possible to separate methods into separate objects.
main.cpp
Code:
#include <iostream>
#include "test.h"
using namespace std;
int main(int argc, char** argv)
{
test t;
cout << t.method1() << " " << t.method2() << endl;
}
test.h
Code:
class test
{
public:
int method1();
int method2();
};
test1.cpp
Code:
#include "test.h"
int test::method1()
{
return 1;
}
test2.cpp
Code:
#include "test.h"
int test::method2()
{
return 2;
}
Code:
$ g++ -c main.cpp
$ g++ -c test1.cpp
$ g++ -c test2.cpp
$ g++ main.o test1.o test2.o
$ ./a.out
1 2
Notice that the last invocation of g++ is just a wrapper for the linker(ld), it links the separate objects into a single executable.