Tengo una posible solución PROVISIONAL aunque puede desbordar:
Código (cpp) [Seleccionar]
#include<iostream>
#include <cstring>
using namespace std;
bool cod_aux(string &s);
void cod(string &s);
int main()
{
string j = "áóÁsÚíu";
cod(j);
cout << endl << j;//-> aoAsUiu
}
void cod(string &s)
{
string aux = "";
string aux2 = "";
bool add = false;
char auxc;
for(int i = 0; i < s.length(); i++)
{
aux +=s[i];
aux +=s[i+1];
if(cod_aux(aux) == false)
{
aux2 += aux;
i = i +1;
}
else aux2 +=s[i];
aux = "";
}
s = aux2;
}
bool cod_aux(string &s)
{
string aux = s;
if(s == "á")
s = "a";
if(s == "Á")
s = "A";
if(s == "é")
s = "e";
if(s == "É")
s = "E";
if(s == "í")
s = "i";
if(s == "Í")
s = "I";
if(s == "Ó")
s = "O";
if(s == "ó")
s = "o";
if(s == "Ú")
s = "U";
if(s == "ú")
s = "u";
return aux == s;
}