| At 01:21 PM 2/16/97 -0500, Michael Gogins wrote:
>
>Although Csound should not be rewritten in C++, it could be rewritten with
>classes. What I mean is structures that collect data used for some purpose
>and work with functions of the form function(class *ptr).
Yes. I am on a development team for a very large C project, and we've had
lots of success with things like this:
MYCLASS.H :
typedef struct myclass {
...
...
} Myclass;
void MyclassInit( Myclass *raw, ... );
void MyclassSomeFunction( Myclass *raw, ..);
MYCLASS.C :
#include "myclass.h"
void MyclassInit( Myclass *raw, ... ) { ... }
void MyclassSomeFunction( Myclass *raw, ..) { ... };
The syntax is a bit more wordy than the same thing in C++, but it makes it
very easy to understand the modularization.
Larry
-- Larry Troxler -- lt@westnet.com -- Patterson, NY USA --
|