Hi
I had been working on some code and I had to reverse a string. I tried to use the swap function as follows:
Code:void swap(char *i, char *j)
{
char temp = *i;
*i = *j;
*j = c;
}
No matter what swapping technique I use, the compiler won't let me do it. I checked the addresses being passed and they were correct. This is what I get.
Obviously I dont need to assign memory to the arguments because that would make them point to a new address in memory. What am I missing?Code:55 [main] newrev 3716 _cygtls::handle_exceptions: Error while dumping state
(probably corrupted stack)
Segmentation fault (core dumped)
Thanks