I have been playing with strcpy http://www.cplusplus.com/reference/cstring/strcpy/ and well, when I do an operation with a source and a destination if that destination have more than the amount of character the source has it works well...but if the destination has the same amount of "space" than the source...once the operation is done the source is deleted, it is like a move more than a copy...It must have a relation with the null character I guess but i can't see why the source is deleted...here I have done an example where you can check that out..
It seem s like if the detination is smaller than the source It get as many characters as it can, but it move them , it doesn't copy them and I cant see why....does anyone know why??thanks
Because strcpy does not check for sufficient space in strDestination before it copies strSource, it is a potential cause of buffer overruns. Therefore, we recommend that you use strcpy_s instead.
And
The behavior of strcpy is undefined if the source and destination strings overlap.
It sounds like you are ending up with the destination string starting location being set to just before the source string location in memory - then the copy operation ends up overwriting the beginning of the source string. If by chance the null character gets copied to the location of the first character of the source, then you'd see nothing when you subsequently try to output the source string.
But the occurence and symptoms of this effect would be seemingly random (for example, running this code in the cpp.sh I didn't get any issue at all).