Hi
i need to have a understanding of Connecting 2 strings using binary “+” operator in plain English. i don’t need to be able to write any code just need to understand the principle.
I believe i have a basic understanding on how deep copying works
· Measure lastname
· Measure firstname
· Create a block of memory for firstname + lastname + 1 for string marker
· Copy firstname into new block
· Concatenate lastname into new name block
· Delete firstname (if this is not done a memory leak will occur)
· Return new name
this will be using pointers as its a deep copy. if any of the above is incorrect could you point me in the right direction
also if possible can anyone help me understand how this process above of copying a 2 strings together is different for a shallow copy?
Thanks