转换成c++: #include<stdio.h> int main() { char a[20]=" You_are_a_girl"; char *p=a; char **ptr=&p; //printf("p=%d\n",p); //printf("ptr=%d\n",ptr); //printf("*ptr=%d\n",*ptr); printf("**ptr=%c\n",**ptr); ptr++; //printf("ptr=%d\n",ptr); //printf("*ptr=%d\n",*ptr); printf("**ptr=%c\n",**ptr); }
时间: 2023-12-14 18:38:40 浏览: 71
SeqList.h #include <stdio.h> //包含标准输入输出流的头文件 #include <assert.h
```cpp
#include <iostream>
using namespace std;
int main() {
char a[20] = " You_are_a_girl";
char *p = a;
char **ptr = &p;
cout << "**ptr=" << **ptr << endl;
ptr++;
cout << "**ptr=" << **ptr << endl;
return 0;
}
```
阅读全文