On Sun, 23 Nov 2003 22:30:54 -0800, Aniruddha wrote:
How do I simulate(to a minimal extent) the
notion of classes and methods in C ?
struct my_class {
int blah;
};
my_class *new_myclass() {
struct my_class *this;
this = malloc(sizeof *this);
/* error handling here */
}
void delete_myclass(struct my_class *this) {
free(this);
}
void my_method(struct my_class *this) {
do_something_to(this);
}
--
NPV
"the large print giveth, and the small print taketh away"
Tom Waits - Step right up