>>hmm.... can we give any example where it'd be necessary [if at all which i doubt] and or a better choice than declaring at the start of a block? thanks!
Some times in big switch statments (eg anything to do with windows) it actually looks neater to put them inside the switch statment. Although even then I still put them just after the case. eg:
Code:
case WM_INITDIALOG : const char* CircName;
HWND EditHandle;
CircName = crMain.Name.c_str();
SetDlgItemText(hwndDlg,
IDC_CCN_NAME,
CircName);
EditHandle = GetDlgItem(hwndDlg,
IDC_CCN_NAME);
SetFocus(EditHandle);
SendMessage(EditHandle,
EM_SETSEL,
0,-1);
return 0;
break;