-1
I need to add a char
on a pointer of char
. For example: I have a pointer of char
called name, which receives "log", after the process, I want it to be "log1".
I tried to implement it like this, but it didn’t work.
bool trocarNome(char *nome){
nome +='1';
cout<<nome;
}
Is there a reason not to use the class
string
?– Maniero