What’s the purpose of using braces (i.e. {}) for a single-line if or loop?

I’m reading some lecture notes of my C++ lecturer and he wrote the following: Use Indentation // OK Never rely on operator precedence – Always use parentheses // OK Always use a { } block – even for a single line // not OK, why ??? Const object on left side of comparison // OK … Read more

Go to Matching Brace in Visual Studio?

Is there a way in Visual Studio 2008 to go from a closing brace to its opening brace? I’ve found a fair amount of stuff about highlighting the brace, but nothing about moving the cursor to it. (VB.NET version of this Question: Keyboard shortcut for Jumping between “If/End If”) 27 s 27 I found this … Read more