定义strcmp函数中定义p和q


int StrCmp(const char* str1, char* str2)
{
    unsigned char* p = (unsigned char*)str1;    **//为什么要用另外两个指针变量p和q?**
    unsigned char* q = (unsigned char*)str2;
    while (*p && *q && *p == *q)                
        p++, q++;
    return *p > * q ? 1 : (*p < *q ? -1 : 0);    
}

请问定义指针变量p和q的意义是什么,直接用str1和str2不可以吗??

str1和str2保存原来指针的地址,避免在后面++的时候后移导致返回时地址错误。