Just as the title says, can I pass a pointer to a function so it\'s only a copy of the pointer\'s contents? I have to be sure the function doesn\'t edit the contents.
<
You can use const
void foo(const char * pc)
here pc
is pointer to const char and by using pc
you can't edit the contents.
But it doesn't guarantee that you can't change the contents, because by creating another pointer to same content you can modify the contents.
So,It's up to you , how are you going to implement it.