Select the current code block
To select the current block of C++ code in the code editor, press Ctrl+U.
Press Ctrl+U a second time to extend the selection to the parent block.
To undo the last selection, press Ctrl+Alt+Shift+U.
Turn on smart block selection
To turn on smart block selection, go to Preferences > Text Editor > Behavior and select Enable smart selection changing.
See also How To: Edit Code and Edit Mode.