다음을 통해 공유


CComCurrency::operator -=

This operator is used to perform subtraction on a CComCurrency object and assign it the result.

const CComCurrency & operator -=(
   const CComCurrency & cur 
);

Parameters

  • cur
    A CComCurrency object.

Return Value

Returns the updated CComCurrency object. In the event of an error, such as an overflow, this operator calls AtlThrow with an HRESULT describing the error.

Example

CComCurrency cur(10, 5000);
cur -= CComCurrency(4, 5000);
ATLASSERT(cur == CComCurrency(6, 0));

Requirements

Header: atlcur.h

See Also

Concepts

CComCurrency Class

CComCurrency Members

CComCurrency::operator -

CComCurrency::operator +

CComCurrency::operator *

CComCurrency::operator /