sc7088@leah.Albany.Edu (S Chakrabarti) (06/01/90)
Hi folks, I am trying to port the AT & T voice library (written in C) to C++. I do not have any source code available for the library functions. All I have is the header file and the library archive. The problem I encounter is that one of the header files contains a varible called class. When I try to compile, it gives me error, since "class" is reserved word for C++ compiler. Do you have any suggestion how can I get around this problem without editing the sysmbol table of the binary archive ? my program looks like as following : extern "C" { #include <sys/v2.h> #include <sys/vl.h> #include <fnctl.h> } and the v2.h has a structure which has a field called "class". Thanks in advance. I will really appreciate if any of you send me email at sc7088@cs.albany.edu. This is very URGENT to my project. I have another question to the advanced users of C++. Usually when a library header file is ported to C++ version its usually done in the following way : #define localtime _____localtime extern char * localtime() #undef _____localtime extern "C" { char * localtime(...) } Why do we require to define and undefine them at the beginning ? I am still not sure why it is done this way. Please answer me at the email address sc7088@cs.albany.edu Thanks again. Samita Chakrabarti