On Tue, 21 Apr 2009 12:36:58 +0000, Solang wrote:
Hi,
I just start learning C++ and have no exeperience with class. I want
to
port my C program to C++.
There are too many member functions and I want to split them into
different files.
What is the simplest method to do it?
You'll almost certainly want to keep all the function *declarations* in a
single header file[*], since this represents the (programatic) interface
to your class functionality. There is nothing stopping you, however, from
splitting member function *definitions* (i.e. implementations) across
several files.
That said, if your class is so huge that this is really an issue, that
suggests to me that you might want to re-think your design.
[*] in fact I know no way of splitting a class declaration across files,
Actually, it is the class *definition* that cannot be split. Just