main.cpp
来自「对于c++primer中前面几章的练习以及书上的例子」· C++ 代码 · 共 29 行
CPP
29 行
#include <cstdlib>
#include <iostream>
#include<string>
using namespace std;
int main(int argc, char *argv[])
{
char *ch="the long\n";
cout<<"&ch:"<<&ch<<endl;
cout<<"*ch:"<<*ch<<endl;
cout<<"ch:"<<ch<<endl;
char * *ival=&ch;
cout<<"&ival为"<<& ival<<"\n";//表示ival的地址
cout<<"*ival为"<<*ival<<"\n";//显示“the long"
string st(ch);
cout<<"st为"<<st<<"\n";
//cout<<"ch :"<<ch<<endl;
char ***pc=&ival;
cout<<"pc:"<<pc<<"\n";
char **pc1=ival;
cout<<"pc1:"<<*pc1<<endl;
system("PAUSE");
return EXIT_SUCCESS;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?