CComCurrency::operator =

Este operador se asigna el objeto de CComCurrency en un nuevo valor.

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

Parámetros

  • curSrc
    Un objeto de CComCurrency .

  • cySrc
    una variable de Monedaescrito.

  • sSrc, fSrc, lSrc, bSrc, usSrc, dSrc, cSrc, ulSrc, dSrc
    El valor numérico a la asignación al objeto de CComCurrency .

Valor devuelto

devuelve el objeto actualizado de CComCurrency .En caso de error, como un desbordamiento, este operador llama AtlThrow con un HRESULT que describe el error.

Ejemplo

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

Requisitos

encabezado: atlcur.h

Vea también

Referencia

Clase de CComCurrency