cpp 9.4
来源:互联网 发布:最新彩票预测软件 编辑:程序博客网 时间:2024/06/08 16:43
9.4
#include<iostream>void oil(int x);int main(){using namespace std;int texas = 31;int year = 2011;cout << "In main(), texas = " << texas << ", &texas = ";cout << &texas << endl;cout << "In main(), year = " << year << ", &year = ";cout << &year << endl;oil(texas);cout << "In main(), texas = " << texas << ", &texas = ";cout << &texas << endl;cout << "In main(),year = " << year << ", year = ";cout << &year << endl;system("pause");return 0;}void oil(int x){using namespace std;int texas = 5;cout << "In main(), texas = " << texas << ", &texas = ";cout << &texas << endl;cout << "In oil(), x = " << x << ", &x = ";cout << &x << endl;{int texas = 113;cout << "In block, texas = " << texas;cout << ", &texas = " << &texas << endl;cout << "In block, x = " << x << ", &x = ";cout << &x << endl;}cout << "Post-block texas = " << texas;cout << ", texas = " << &texas << endl;}
external.cpp
#include<iostream>using namespace std;double warming = 0.3;void update(double dt);void local();int main(){cout << "Global warming is " << warming << " degrees.\n";update(0.1);cout << "Global warming is " << warming << " degrees.\n";local();cout << "Global warming is " << warming << " degrees.\n";system("pause");return 0;}
support.exe
#include<iostream>extern double warming;void update(double dt);void local();using std::cout;void update(double dt){extern double warming;warming += dt;cout << "Updating global warming to " << warming;cout << " degrees.\n";}void local(){double warming = 0.8;cout << "Local warming = " << warming << " degrees.\n";cout << "But global warming = " << ::warming;cout << " degrees.\n";}
0 0
- cpp 9.4
- cpp
- CPP
- CPP
- cpp
- cpp
- CPP
- CPP
- cpp-netlib0.9.4+boost_1_51_0安装笔记
- ClientSockThread.cpp&&ClientUrlThread.cpp
- cpp调用其他cpp
- ex34a.cpp&&ex34aDoc.cpp&&ex34aView.cpp
- MainFrm.cpp&&ServerThread.cpp&&SheetConfig.cpp
- CPP thread
- cpp->html
- CFaderWnd.cpp
- PasswordReminder.cpp
- object.cpp
- 第十六周项目二【大数据集上排序算法性能的体验】
- mysql开启innodb引擎
- 使用python进行数据迁移案例
- 第16周 项目1-验证算法(直接选择排序)
- 对javascrip中Array类型的操作方法的理解
- cpp 9.4
- 第十周项目1-二叉树算法库
- 第十五周 项目4 直接插入排序
- oracle查询表内的重复数据,并删除重复数据
- 第十六周项目一(2)快速排序
- 点位精度评定
- 第十五周项目3——项目3 - B-树的基本操作
- mptcp包结构
- bug宝典JAVA篇 java.nio.charset.UnsupportedCharsetException: cp0