⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 memory.cpp

📁 Windows CE上的计算器
💻 CPP
字号:
//////////////////////////////////////////////////////////////////////
//
// Memory.cpp: implementation of the CMemory class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "memory.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

const long double kZero=0.0;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

//initialization
CMemory::CMemory()
{
	bStored=FALSE;
	mData=kZero;
}

CMemory::~CMemory()
{
	//Do Nothing..
}
//MR
long double CMemory::Read()
{
	return mData;
}
//MS
void CMemory::Save( long double data )
{
	if (data)
	{
		mData=data;
		bStored=true;
	}
}
//MC
void CMemory::Clear()
{
	mData=kZero;
	bStored=false;
}
//M+
void CMemory::Add( long double inData )
{
	mData+=inData;
	bStored=true;
}

bool CMemory::isStored()
{
	return bStored;	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -