John Darrington wrote: > I don't think this will solve all problems. > > For example if you have: > > > > #include <unistd.h> > > struct foo > { > void write (char *); > }; > > func (struct foo *f) > { > f->write ("hello"); > } > > > > then one will get an error similar to "rpl_write is not a member of foo"
Huh? If <unistd.h> does '#define write rpl_write', then the preprocessed code is: struct foo { void rpl_write (char *); }; func (struct foo *f) { f->rpl_write ("hello"); } and this will compile fine. Bruno