Hi, I did a function in C ++ where you must enter characters that are inserted in a set passed by parameter until "*" is entered.
But I get an error when comparing the while
(comparison between pointer and integer ( int
and const char *
), I would like to know what is wrong.
set <char> ingresar_caracter(set <char> conjunto){
char caracter;
cout << "Ingrese un caracter (* para terminar): ";
cin >> caracter;
cout << endl;
while(caracter != "*") comparison between pointer and integer ('int' and 'const char *')
{
conjunto.insert(caracter);
cout << "Ingrese otro caracter (* para terminar): ";
cin >> caracter;
cout << endl;
}
return conjunto;
}
I'm using the QCreator