Let me ask you a question:
In your function concatenator(), the object str is a pointer. Where does it point to?