I'm rather new to c++ and today, while trying to find out the best way to write a log handling class, I've stumbled upon theese two code snippets from Dr. Dobb's website (http://www.ddj.com/cpp/201804215?pgno=1):
Log::ReportingLevel() = logDEBUG2;
const int count = 3;
Log().Get(logDEBUG) << "A loop with " << count << " iterations";
for (int i = 0; i != count; ++i)
{
Log().Get(logDEBUG1) << "the counter i = " << i;
}
I'm shure it's very simple but I do not really understand what's the meaning of this assignment that has a function on it's left hand side:
Log::ReportingLevel() = logDEBUG2;
The function is static, but otherwise looks like a "normal" function ...