求详细解释,指针好晕啊
#include<iostream>
using namespace std;
int main(int argc,char **argv)
{
char *str[]={"welcome","to","boyaa","shenzhen"};
char **p=str+1;
str[0]=(*p++)+1;
str[1]=*(p+1);
str[2]=p[1]+3;
cout<<str[2]-str[1]<<endl;
str[3]=p[0]+(str[2]-str[1]);
cout<<str[0]<<" "<<str[1]<<" "<<str[2]<<" "<<str[3]<<endl;
return 0;
using namespace std;
int main(int argc,char **argv)
{
char *str[]={"welcome","to","boyaa","shenzhen"};
char **p=str+1;
str[0]=(*p++)+1;
str[1]=*(p+1);
str[2]=p[1]+3;
cout<<str[2]-str[1]<<endl;
str[3]=p[0]+(str[2]-str[1]);
cout<<str[0]<<" "<<str[1]<<" "<<str[2]<<" "<<str[3]<<endl;
return 0;
}