3
I need to create a string which contains "Mr: n" and the name of the person concerned (pessoa->nome
).
char* endereca(Pessoa* pessoa)
{
if(pessoa->sexo == 'M')
{
char *msg;
msg = (char*)malloc(7*sizeof(char) + sizeof(pessoa->nome));
msg = "Ao Sr.:\n" + pessoa->nome; //Erro aqui
}
}
Did any of the answers solve your question? Do you think you can accept one of them? Check out the [tour] how to do this, if you haven’t already. You would help the community by identifying what was the best solution for you. You can accept only one of them. But you can vote on any question or answer you find useful on the entire site (when you have enough score).
– Maniero