One class with multiple implementation files

Viewed 9755

Is there anything wrong with having a single class (one .h) implemented over multiple source files? I realize that this could be a symptom of too much code in a single class, but is there anything technically wrong with it?

For instance:

Foo.h

class Foo
{
   void Read();
   void Write();
   void Run();
}

Foo.Read.cpp

#include "Foo.h"
void Foo::Read()
{
}

Foo.Write.cpp

#include "Foo.h"
void Foo::Write()
{
}

Foo.Run.cpp

#include "Foo.h"
void Foo::Run()
{
}
7 Answers
Related