From: Benny S. <ich...@pa...> - 2008-12-19 07:29:58
|
In the file exif-data.h, I am confused by some statements. The file starts with: ******************************************************* #ifndef __EXIF_DATA_H__ #define __EXIF_DATA_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ ..... many other statements...... #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __EXIF_DATA_H__ */ ******************************************************* I understand the statements containing __EXIF_DATA_H__. Regarding the statements: #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ If __cpluplus is defined, then extern "C" is declared, { is opened, and then there is an #endif. What do these three statements accomplish? Near the bottom of the file, another #ifdef __cplusplus statement appears, then the } is closed, and another #endif /* __cplusplus */ statement appears. I do not understand the function of the second #ifdef __cplusplus statement just before the }. What is the purpose of the declaration (made somewhere else in the library) of __cplusplus? Where (in what file) is that declaration made? All of the other statements in the file exif-data.h are contained between { and } , therefore, apparently controlled by the #ifdef __cplusplus statement at the beginning. Why? Thanks, Benny Smith Santa Rosa, CA |