다음을 통해 공유


CComCurrency::operator =

이 연산자를 할당은 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
    A CComCurrency 개체입니다.

  • cySrc
    형식의 변수에 통화.

  • sSrc, fSrc, lSrc, bSrc, usSrc, dSrc, cSrc, ulSrc,dSrc
    숫자 값을 할당 하는 CComCurrency 개체입니다.

반환 값

업데이트 된 반환 CComCurrency 개체입니다. 등에서 오버플로 오류가 발생 하는 경우이 연산자를 호출 합니다. AtlThrow 와 오류를 설명 하는 HRESULT입니다.

예제

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 Class