strGroupName = const_cast<_TCHAR*>( _tcschr(strTempName, 92));
This is because the variant of the function used has const _TCHAR * as input and returns the constant _TCHAR *.
Another option would be to have strTempName declared as _TCHAR * and not as const _TCHAR *. In this case, a variant function is used that has the _TCHAR * parameter and returns the _TCHAR * value.
source share