siavoshkc, your program has a memory leak. you did not delete your dynamically allocated memory. you should definitely stick with the standard string class for this kind of task, like ChaosEngine said.
sure it's more of a challenge to use pointers, but it's even MORE of a challenge debugging your memory leaks when you start to have problems...