I want to use pointers to reverse a char array in C++. I was wondering if there is anything that I should do differently? Am I doing this correctly? Is there a more efficie
Assuming you can't use anything but C string functions, I would
avoid pre-declaring variables at the beginning of the function. This is a requirement of C (with the 1990 standard), but in C++ it is more idiomatic to declare and initialize variables where you use them.
avoid going out of bounds (decrementing beyond start of string) if the string is empty.
So something like:
void reverse(char* string)
{
    char* first = string;
    char* last = string + strlen(string);
    while(first < last)
    {
        --last; //avoids decrementing last beyond start of string if string is empty
        char temp = *first;
        *first = *last;
        *last = temp;
        ++first;
    }
}