Data breakpoint is a breakpoint that be triggered when the content of a specified memory location is modified.
In a complex program, to find where and when a specific variable was modified may be difficult.
First step is download source code from github.
If you are using Visual Studio 10, after update the solution file, modify log4cppLIB.vcxproj like this.
The const modifier is always a confusing keyword. Here are some of them.
They are equivalent, the const modifies the left element, if the const has no left element, means the const is the first key word, then it modifies the right element.
The assignment operator and copy constructor often confuse people. Here is an example.
If you create new object from old object like this.
If you define your member function inside class declaration , they are implicitly inline.
The inline function is supposed to improve the performance by embedding the function body to calling place and so reduce calling cost. It has two disadvantages: add the size of the program and change of the inline function will make caller recompile.
enum(enumeration) is a user-defined type consisting of a set of enumerators( enumerator --- named integer constant)
Simple enum definition:
The C++ STL(Standard Template Library) is a carefully constructed library developed by Alexander Stepanov, Meng Lee and others at Hwelett Packard.
The core of STL include container which represent data structure and algorithm which apply on the data structure and iterator which is the bridge between container and algorightm.
This example comes from the book of "Addison-Wesley, Designing Components with the C++ STL, Electronic 3rd Edition.pdf". Its a simple list implements an iterator in the class.
Look at each function carefully and get a clear idea of the mechnnism you will understand the core of the STL.