function perkey() is using an unitilized pointer
ptr Is the intent of that function to copy the contents of one string into another and return the pointer to the new string? Like strcpy() ? If so, then you need to call malloc() first to allocate memory for the new string.
[b]printArray[b] -- why are you using a loop to print each individual character when cout will print the entire string in one shot ?
And yes, you should have just started a new thread to ask your question.
[edit]Ok , ok so I failed to look at the datestamp of egemen's post -- three months old

[/edit]
Last edited by Ancient Dragon; Jun 10th, 2007 at 9:16 am.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Offline 21,947 posts
since Aug 2005