C/C++ 指针 <一>
来源:互联网 发布:阿里云服务器端口管理 编辑:程序博客网 时间:2024/05/18 15:23
//address.cpp
//using the & operator to find addresses
#include <iostream>
int main()
{
using namespace std;
int donuts = 6; //donuts dron^ts n, 甜甜圈
double cups = 4.5;
cout << "donuts value = "<< donuts << "\t";
//donuts 代表变量值, &donuts代表变量地址
cout << " and donuts address = "<< &donuts<<endl;
// NOTE : you may need to use unsigned (&donuts)
// and unsigned(&cups)
cout << "cups value = " << cups <<"\t";
cout << " and cups address = " << &cups << endl;
return 0;
//using the & operator to find addresses
#include <iostream>
int main()
{
using namespace std;
int donuts = 6; //donuts dron^ts n, 甜甜圈
double cups = 4.5;
cout << "donuts value = "<< donuts << "\t";
//donuts 代表变量值, &donuts代表变量地址
cout << " and donuts address = "<< &donuts<<endl;
// NOTE : you may need to use unsigned (&donuts)
// and unsigned(&cups)
cout << "cups value = " << cups <<"\t";
cout << " and cups address = " << &cups << endl;
return 0;
}
结果如下:
0 0
- C/C++ 指针 <一>
- C语言--指针(一)
- C和指针 一
- c指针(一)
- C语言指针【一】
- C指针操作(一)
- C指针(一)
- 深入浅出 C语言指针 一
- C/C++指针精髓(一)
- C语言指针(一)
- C/C++指针精髓 (一)
- c指针简单测试一
- c 语言指针练习<一>
- c与指针(一)
- C语言指针见解一
- 《C和指针》整理一
- C语言------指针(一)
- 浅析C指针(一)
- 关于CRecordset::Open(vs2010)
- 题目1008:最短路径问题
- 费用报销模块设计
- android专业技术网站
- ajax 取 JSON 中文乱码
- C/C++ 指针 <一>
- 每日阅读(产品) 汤道QQ与微信
- ClassLoader.getResourceAsStream(String resName)
- Windows 8.1更新变化
- SIP开发环境的搭建
- C++中枚举的应用
- Android HttpClient(Get,Post方式)进行网络通信
- 关联的出来的值 看上去不像你要的
- MFC与Matlab编程总结 (以《Matlab与C/C++混合编程技术(第三版)》-刘维 第五章 生成DLL为例)