Ver Mensaje Individual
  #9 (permalink)  
Antiguo 22/05/2015, 07:26
Avatar de detective_jd
detective_jd
 
Fecha de Ingreso: abril-2011
Ubicación: Salto
Mensajes: 437
Antigüedad: 13 años
Puntos: 6
Respuesta: tildes y acentuación en c++/linux

Ahora si me funcionó, mil gracias, acá está el tema

#include <iostream>
#include <locale>
#include <string>
using namespace std;

int main(){
wstring str;
setlocale(LC_ALL,"");
wcout << L"Introduce la cadena a poner en mayúsuculas: ";
getline(wcin,str);
for (size_t i = 0; i < str.length(); i++)
str[i] = towupper(str.at(i));
wcout << str;
}

y lo q pasó x consola:

Introduce la cadena a poner en mayúsuculas: pepón pepito tiene un ñu pequeñito
PEPÓN PEPITO TIENE UN ÑU PEQUEÑITO
RUN FINISHED; exit value 0,; real time: 13s; user: 0ms; system: 0ms

sólo una pregunta q diferencia hay entre wstring y el string común???

Saludos y mil gracias.