因为 [] 比 * 优先级 高
int ** p;
以下代码p是存放 的是 str 的地址
str是指向字符串的字符指针。
*p 代表着 输出 str的值
#include<iostream>
using namespace std;
int main() {
const char *str = "HelloWorld" ;
const char** p;
p = &str;
cout << "p =" << *p; //p = HelloWorld
return 0;
}
#include <stdio.h>
int main(int argc,char * argv[]) {
for (int i = 0; i < argc; i++) {
printf("i= %d , argv[%d] = %s\n", i, i, argv[i]);
}
return 0;
}
原文:https://www.cnblogs.com/appearAndLeave/p/14762694.html