CComCurrency::operator =

更新 : 2007 年 11 月

CComCurrency オブジェクトに新しい値を代入します。

const CComCurrency & operator =(
   const CComCurrency & curSrc 
) throw( );
const CComCurrency & operator =(
   CURRENCY cySrc 
) throw( );
const CComCurrency & operator =(
   FLOAT fSrc 
);
const CComCurrency & operator =(
   SHORT sSrc 
);
const CComCurrency & operator =(
   LONG lSrc 
);
const CComCurrency & operator =(
   BYTE bSrc 
);
const CComCurrency & operator =(
   USHORT usSrc 
);
const CComCurrency & operator =(
   DOUBLE dSrc 
);
const CComCurrency & operator =(
   CHAR cSrc 
);
const CComCurrency & operator =(
   ULONG ulSrc 
);
const CComCurrency & operator =(
   DECIMAL dSrc 
);

パラメータ

  • curSrc
    CComCurrency オブジェクト。

  • cySrc
    CURRENCY 型の変数。

  • sSrc、fSrc、lSrc、 bSrcusSrc、dSrc、 cSrculSrc、dSrc
    CComCurrency オブジェクトに代入する数値。

戻り値

更新後の CComCurrency オブジェクトを返します。オーバーフローなどのエラーのイベントで、この演算子は、エラーを表す HRESULT を使用して AtlThrow を呼び出します。

使用例

CComCurrency cur1, cur2(10, 5000);
CURRENCY cy;

// Copying one object to another 
cur1 = cur2;

// Using the CURRENCY data type
cy.int64 = 105000;
cur1 = cy;

ATLASSERT(cur1 == cur2);

必要条件

ヘッダー : atlcur.h

参照

参照

CComCurrency クラス

その他の技術情報

CComCurrency のメンバ