mathe.cpp
来自「Thinkinc++English 电子书籍,英文版」· C++ 代码 · 共 33 行
CPP
33 行
// Mathe.cpp : Implementation of CMathe
#include "stdafx.h"
#include "Simple3.h"
#include "Mathe.h"
/////////////////////////////////////////////////////////////////////////////
// CMathe
STDMETHODIMP CMathe::Add(long n1, long n2, long *pnVal)
{
*pnVal = n1 + n2;
return S_OK;
}
STDMETHODIMP CMathe::Cat(BSTR s1, BSTR s2, BSTR *psVal)
{
CComBSTR s( s1 );
s.AppendBSTR( s2 );
*psVal = s.Copy();
return S_OK;
}
STDMETHODIMP CMathe::Mul(long n1, long n2, long *pnVal)
{
*pnVal = n1 * n2;
return S_OK;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?