fig07_10.cpp

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

CPP
17
字号
// Fig. 7.10: fig07_10.cpp
// Hiding a class抯 private data with a proxy class.
#include <iostream.h>
#include "interface.h"

int main()
{
   Interface i( 5 );
 
   cout << "Interface contains: " << i.getValue() 
        << " before setValue" << endl;
   i.setValue( 10 );
   cout << "Interface contains: " << i.getValue() 
        << " after setValue" << endl;
   return 0;
}

⌨️ 快捷键说明

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