I have the following simple function:

```
void reverse(char* str) {
    if (str == NULL)
        return;
    char* end = str;
    while(*end != NULL) {
        end++;
    }
    end--;  
    while(str < end){
        char temp = *str;
        *str++ = *end;
        *end-- = temp;
    }   
}

int main(int argc, char* argv[]) {
    char* second = "SOMETHING\0";
    cout << "Before Reverse String: " << second << '\n';
    reverse(second);
    cout << "Reverse String: " << second << '\n';
}

```

Simple, right? however I'm getting a Segmentation Fault in lines

```
*str++ = *end 
*end-- = temp

```

What am I missing?

Thanks!