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...
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 ...
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.
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...
In my project code, I found that someone used #ifdef and #if in code. I would like to know what does purpose for using them? As my knowledge, it said to the preprocessor will not do anything inside...
Possible Duplicate: What are the differences between pointer variable and reference variable in C++? This is confusing me: class CDummy { public: int isitme (CDummy& param); }; int CD...
I want to iterate through each element in the map<string, int> without knowing any of its string-int values or keys. What I have so far: void output(map<string, int> table) { m...
I have installed Clang by using apt-get in Ubuntu, and I can successfully compile C files using it. However, I have no idea how to compile C++ through it. What do I need to do to compile C++?
B. 'static' keyword used for functions in terms of functions, the static keyword has a straightforward meaning. Here, it refers to linkage of the function Normally all functions declared within a cpp file have external linkage by default, i.e a function defined in one file can be used in another cpp file by forward declaration.