¡@

Home 

c++ Programming Glossary: pthing

Pro/con: Initializing a variable in a conditional statement

http://stackoverflow.com/questions/136548/pro-con-initializing-a-variable-in-a-conditional-statement

initialize a variable in an if statement like so if CThing pThing GetThing Why would one consider this bad or good style What.. i like this style because it limits the scope of the pThing variable so it can never be used accidentally when it is NULL... However i don't like that you can't do this if CThing pThing GetThing pThing IsReallySomeThing If there's a way to make the..