there is a problem in the c++ code. but i am not getting. the link is given below. it would be great help if someone helps me with finding the error of the code. the link is given below:
http://ideone.com/cEMBQB
thanks in advance
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Mar 30, 2013, 10:29 AM
If you use a char array rather than char * then the compiler should treat is as a modifiable string and it should then work OK.
I've also made another change in the reverse() function as, at present, you're reversing the first 8 characters of the second string, not the first 7: