資源簡介
我供搜集整理了近30個不同的C++課設源代碼以及相應的報告,分別放在我的csdn和豆丁網上,搜索aoelfhong找到我,然后就可以找到我的這些資源了,另外我的豆丁還有39多個數據結構課設報告及代碼。
僅供參考使用。
代碼片段和文件信息
//?Bubble.cpp:?implementation?of?the?CBubble?class.
//
//////////////////////////////////////////////////////////////////////
#include?“stdafx.h“
#include?“CPP.h“
#include?“Bubble.h“
#ifdef?_DEBUG
#undef?THIS_FILE
static?char?THIS_FILE[]=__FILE__;
#define?new?DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
//?Construction/Destruction
//////////////////////////////////////////////////////////////////////
IMPLEMENT_SERIAL(?CBubble?Cobject?1?)
CBubble::CBubble()
{
}
CBubble::CBubble(CPoint?m_pointint?m_radiusCOLORREF?m_colour)
{
this->m_point=m_point;
this->m_radius=m_radius;
????this->m_colour=m_colour;
}
CBubble::~CBubble()
{
}
void?CBubble::Draw(CDC?*pDC)
{
CBrush?brush(m_colour);
pDC->Selectobject(&brush);
pDC->Ellipse(m_point.x-m_radiusm_point.y-m_radiusm_point.x+m_radiusm_point.y+m_radius);
}
void?CBubble::Serialize(CArchive?&ar)
{
if?(ar.IsStoring())
{
ar< }
else
{
ar>>m_point>>m_radius>>m_colour;
}
}
- 上一篇:C++ 視頻采集
- 下一篇:VC++MFC串口調試助手完整編輯過程介紹
評論
共有 條評論