I've got a function which receives a pointer to a string. Now I want to duplicate this pointer, so I could run on the string with one pointer, and have another pointer which saves the beginning of the string. I hope my question is clear, I don't want to create a pointer to the pointer (which points to where the first pointer points and changes with it), I want a pointer which will point to the address of which the first pointer points.
I tried many different ways but none of them worked, this is my latest try, I keep getting "initialization makes pointer from integer without a cast"
int move_chars (char *str, int start, int end, int dist){
int strsize = end - start + 1;
char *p = *str;
char *p = str;asstris achar*and*stris achar.