VC++ tutorial driving me insane!

This is a discussion on VC++ tutorial driving me insane! within the C++ Programming forums, part of the General Programming Boards category; Hi, This tutorial on SDI apps. from Learn VC++ in 21 Days is driving me up the wall. I typed ...

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    30

    Unhappy VC++ tutorial driving me insane!

    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

  2. #2
    Registered User
    Join Date
    May 2003
    Posts
    32
    I have the book but I haven't touched that part yet.


    I hope someone will solve this problem.
    Last edited by javacvb; 11-30-2003 at 05:25 AM.
    [SIZE= 4]My favorite search engine is http://www.ultimasurf.com [/size]

  3. #3
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,607
    Compiler doesn't know what "CLine" is.
    Include the header file that contains CLine.

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. for loop problem driving me insane!!
    By creeping death in forum C Programming
    Replies: 7
    Last Post: 12-22-2008, 07:38 AM
  2. NetBeans + Cygwin driving me insane
    By Del75 in forum C++ Programming
    Replies: 4
    Last Post: 08-17-2008, 05:03 AM
  3. Driving me insane - Debugger
    By Hugo716 in forum C++ Programming
    Replies: 3
    Last Post: 05-18-2006, 11:09 AM
  4. Conceptually simple & driving me insane
    By cboard_member in forum C++ Programming
    Replies: 5
    Last Post: 03-11-2006, 12:35 PM
  5. JAVA issue driving me insane
    By axon in forum Tech Board
    Replies: 0
    Last Post: 02-23-2004, 08:19 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21