我是大英雄
2022-07-15 22:15
A aaa; A & getA(){ return aaa; } int main(int argc,char **argv) { A bbb; getA() = bbb; return 0; }
#include<stdio.h>
int main()
{
int aaa = 20;
int bbb = 30;
// const int * constPoint = &aaa;
// printf("zhizhen: %d\n",* constPoint);
// constPoint = &bbb;
// printf("zhizhen: %d\n",* constPoint);
// *constPoint = 000;
int * const p = &aaa;
* p = 50;
// p = &bbb;
printf("zhizhen: %d\n",* p);
const int * const d = &bbb;
printf("zhizhen: %d\n",* d);
}
趣味 C++ 进阶
13927 学习 · 44 问题
相似问题