const变量的修改实践
2024-09-05 14:11:49
https://bbs.csdn.net/topics/110049293
#include <iostream> using namespace std; int main(){ cout << "const变量实践:" << endl; // 必须加 volatile才会改变
const volatile int a111 = ; *((int*)&a111) = ;
cout<<a111<< endl;; cout << "a111:" << a111 << endl; register int b = ; cout << "b:" << b << endl; int *p1 = (int*)&a111;
cout << "*p11:" << *p1 << endl; int *p2 = &b;
cout << "*p2:" << *p2 << endl; cout << "end." << endl;
return ;
}
最新文章
- Python小白的发展之路之Python基础(二)
- android开发--ormlite
- DP ZOJ 2745 01-K Code
- [Everyday Mathematics]20150303
- HZNU1015: 矩阵排序
- ASP.net 判断上传文件类型的三种方法
- 设置Android程序的默认安装位置
- Powershell变量的幕后管理
- 一种SpringMVC调用Javascript的方法
- Android笔记: 播放提示音 的简单方法
- 为Python添加中文关键字
- ServiceStack 简单服务搭建
- Lintcode400 Maximum Gap solution 题解
- Linux系统优化脚本
- nodejs 实现跨域
- Oracle unusable index 与unvisible index
- SQLite3命令操作大全
- iOS UI基础-19.0 UICollectionView
- Windows Azure Storage (24) 启用Azure Blob日志
- draftsight的热补丁