interface.cpp

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

CPP
14
字号
// Fig. 7.10: interface.cpp
// Definition of class Interface
#include "interface.h"
#include "implementation.h"

Interface::Interface( int v ) 
   : ptr ( new Implementation( v ) ) { }

// call Implementation's setValue function
void Interface::setValue( int v ) { ptr->setValue( v ); }

// call Implementation's getValue function
int Interface::getValue() const { return ptr->getValue(); }

⌨️ 快捷键说明

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