C++のswitch文で「crosses initialization of~」というエラーの対処

C++のswitch文で「crosses initialization of」というエラーの対処方法について紹介します。