¿Estas en Windows?
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale
https://docs.microsoft.com/en-us/cpp/c-runtime-library/language-strings
Código (c++) [Seleccionar]
setlocale(LC_ALL, "es-ES");
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale
https://docs.microsoft.com/en-us/cpp/c-runtime-library/language-strings