这是咋了呀,研究半天,真的完全不会

void CDrawCoinView::OnDraw(CDC* pDC)
{
CDrawCoinDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);

// TODO: 在此处为本机数据添加绘制代码
for (int i = 0; i < pDC->m_nCoins; i++)
{
    int y = 200 - 10 * i;
    pDC->Ellipse(200, y, 300, y - 30);
    pDC->Ellipse(200, y-10, 300, y - 35);
}

}
总是显示:class "CDC" 没有成员 "m_nCoins"

那到底有没有啊?没听说CDC类有这么一个东西。应该是pDoc->m_nCoins吧
m_nCoins应该是你的文档类CDrawCoinDoc的成员变量