Hi,
This tutorial on SDI apps. from Learn VC++ in 21 Days is driving me up the wall. I typed it all in as the PDF file won't let me copy and paste When I compiled it I got 18 errors and I cannot for the life of me find the stinkin' bug. It's probably something stupid as the 1st error msg seems to indicate but I've tried all kinds of stuff. Then I thought maybe some of the variables were declared as public when they were supposed to be private or the functions were like that or I was missing brackets in my functions. Can some1 take a look @ this code and see if you can find the problem? I redid the whole tutorial section and got the same 18 error msgs. See code below with 1st error msg.
Thanks a million!
Swaine777
Code:
class CDayTenDoc : public CDocument
{
protected: // create from serialization only
CDayTenDoc();
DECLARE_DYNCREATE(CDayTenDoc)
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDayTenDoc)
public:
virtual BOOL OnNewDocument();
virtual void Serialize(CArchive& ar);
//}}AFX_VIRTUAL
// Implementation
public:
CLine* GetLine(int nIndex); // here's the problem line
// error msg: c:\code\dayten\daytendoc.h(35) : error C2143:
// syntax error : missing ';' before '*'
int GetLineCount();
CLine* AddLine(CPoint ptFrom, CPoint ptTo);
virtual ~CDayTenDoc();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif