fig03_24.cpp

来自「经典vc教程的例子程序」· C++ 代码 · 共 19 行

CPP
19
字号
// Fig. 3.24: fig03_24.cpp
// Using the unary scope resolution operator
#include <iostream.h>
#include <iomanip.h>

const double PI = 3.14159265358979;

int main()
{
   const float PI = static_cast< float >( ::PI );

   cout << setprecision( 20 )
        << "  Local float value of PI = " << PI
        << "\nGlobal double value of PI = " << ::PI << endl;

   return 0;
}

⌨️ 快捷键说明

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