CComCurrency::operator =

Dieser Operator weist das CComCurrency-Objekt auf einen neuen Wert zu.

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 
);

Parameter

  • curSrc
    Ein CComCurrency -Objekt.

  • cySrc
    Eine Variable vom Typ CURRENCY.

  • sSrc, fSrc, lSrc, bSrc, usSrc, dSrc, cSrc, ulSrc, dSrc
    Der numerische Wert, mit dem des Objekts CComCurrency zuzuweisen.

Rückgabewert

Gibt das aktualisierte CComCurrency-Objekt zurück.Im Falle eines Fehlers wie ein Überlauf, ruft dieser Operator AtlThrow mit einem HRESULT auf, das den Fehler beschreibt.

Beispiel

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);

Anforderungen

Header: atlcur.h

Siehe auch

Referenz

CComCurrency-Klasse