⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scopeop.cpp

📁 Since the field of object oriented programming is probably new to you, you will find that there is a
💻 CPP
字号:
                               // Chapter 1 - Program 2 - SCOPEOP.CPP
#include <iostream.h>

int index = 13;

int main()
{
float index = 3.1415;

   cout << "The local index value is " << index << "\n";
   cout << "The global index value is " << ::index << "\n";

   ::index = index + 7;  // 3 + 7 should result in 10

   cout << "The local index value is " << index << "\n";
   cout << "The global index value is " << ::index << "\n";

   return 0;
}




// Result of execution
//
// The local index value is 3.1415
// The global index value is 13
// The local index value is 3.1415
// The global index value is 10

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -