指向字符型数据的指针变量

 1 #include <iostream>
 2 
 3 /* run this program using the console pauser or add your own getch, system("pause") or input loop */
 4 using namespace std;
 5 int main(int argc, char** argv) {
 6 char **p;
 7 char *name[]={"one","two","three","four","five"};
 8 p=name+2;
 9 cout <<*p<<endl;
10 cout <<**p<<endl;
11 return 0;
12 }

 

posted @ 2018-08-01 15:51  borter  阅读(181)  评论(0编辑  收藏  举报