The first cout in the join function gives me the right result, but when setting the return i get the address (I think it is), or no memory is correctly allocated. Any solution to these?
@Thomas1965 - Line 8: you have the comparison reversed. I would presume you intended to return without doing anything if the combined size was larger than the size of the output buffer.