Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!leah!sc7088 From: sc7088@leah.Albany.Edu (S Chakrabarti) Newsgroups: comp.lang.c++ Subject: extenrn "C" problem Message-ID: <3107@leah.Albany.Edu> Date: 31 May 90 18:47:17 GMT Organization: The University at Albany, Computer Services Center Lines: 43 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 #include #include } 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