In C++ you can initialize a variable in an if statement, like so:
if (CThing* pThing = GetThing()) { }
Why would one consider this bad or g
It's acceptable and good coding practice. However, people who don't come from a low-level coding background would probably disagree.