I found this line of a code in a class which I have to modify: ::Configuration * tmpCo = m_configurationDB;//pointer to current db and I don't know what exactly means the double colon prepended to...
95 .cpp is the recommended extension for C++ as far as I know. Some people even recommend using .hpp for C++ headers, just to differentiate from C. Although the compiler doesn't care what you do, it's personal preference.
The three distinct operators C++ uses to access the members of a class or class object, namely the double colon ::, the dot ., and the arrow ->, are used for three different scenarios that are always well-defined. Knowing this allows you to immediately know quite a lot about a and b just by looking at a::b, a.b, or a->b, respectively, in any code you look at. a::b is only used if b is a member ...
Possible Duplicates: *.h or *.hpp for your class definitions What is the difference between .cc and .cpp file suffix? I used to think that it used to be that: .h files are header files for C and C...
I have some template code that I would prefer to have stored in a CPP file instead of inline in the header. I know this can be done as long as you know which template types will be used. For exam...
0 I propose to simply include an All.h in the project that includes all the headers needed, and every other .h file calls All.h and every .c/.cpp file only includes its own header.
The .cpp file is the compilation unit: it's the real source code file that will be compiled (in C++). The .h (header) files are files that will be virtually copied/pasted in the .cpp files where the #include precompiler instruction appears. Once the headers code is inserted in the .cpp code, the compilation of the .cpp can start.
The meaning of #ifdef is that the code inside the block will be included in the compilation only if the mentioned preprocessor macro is defined. Similarly, #if means that the block will be included only if the expression evaluates to true (when replacing undefined macros that appears in the expression with 0). One important point here is that the preprocessor processes the source before it's ...