dealing with libs that have lots of variables named "new"

Any clever solutions to this that I’m not aware of? The .h file to link to has lots of methods like:

void method(…TYPE *new);

Which is fine in C but not so cricket in C++. Is there some special C++ trick other than a massive renaming expedition on my part?

if the compiler is freaking out with including “h” files from a c++ library, you can do:

  
  
extern "C" {  
 #include "myOldSchoolHFile.h"  
}  
  

or something like that (writing it off memory)

then the compiler will treat that .h file as for c not c++.

see the c++ faq for tips on mixing c and c++

take care,
zach

Ah, right, forgot about that, does the trick perfectly. Here’s the link in case anyone else is stumbling across this:

http://www.parashift.com/c+±faq-lite/m-…-d-cpp.html

Thanks!

Ah, so just to give this a wee update, extern is cool for C code but ‘new’ isn’t cricket whether you wrap it or not, and it isn’t ok with g++ at all unless you set the language flag to c. gcc compiles it fine, but it’s definitely against the C++ standard, the only way I could get it to compile was to dig through the files and rename everything.