CTypedPtrList problems

This is a discussion on CTypedPtrList problems within the C++ Programming forums, part of the General Programming Boards category; Hello all, I can't seem to get this to work, even though it has been typed in exactly as in ...

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    27

    CTypedPtrList problems

    Hello all,
    I can't seem to get this to work, even though it has been typed in exactly as in a book:

    class CLinesDoc : public CDocument
    {
    protected: // create from serialization only
    CLinesDoc();
    DECLARE_DYNCREATE(CLinesDoc)

    // Attributes
    public:
    CTypedPtrList<CObList, CLine*>m_LineList; //line list
    CLine LineArray[1000];//array to hold the line objects in
    int OnOffArray[1000];//array to see if lines should be drawn

    The errors it comes up with are:
    error C2143: syntax error : missing ';' before '<'
    error C2501: 'CTypedPtrList' : missing storage-class or type specifiers
    error C2059: syntax error : '<'
    error C2238: unexpected token(s) preceding ';'

    any help would be greatly appreciated.
    Cheers
    Dylan

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,671
    Code:
    #include <afxtempl.h>
    gg

  3. #3
    Registered User
    Join Date
    Apr 2003
    Posts
    27

    Superb

    Thank you very much

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. No clue how to make a code to solve problems!
    By ctnzn in forum C Programming
    Replies: 8
    Last Post: 10-16-2008, 02:59 AM
  2. C Pointers Problems
    By mhelal in forum C Programming
    Replies: 8
    Last Post: 01-10-2007, 05:35 AM
  3. String Manipulation problems -_-
    By Astra in forum C Programming
    Replies: 5
    Last Post: 12-13-2006, 04:48 PM
  4. Rendering problems (DirectX?)
    By OnionKnight in forum Tech Board
    Replies: 0
    Last Post: 08-17-2006, 12:17 PM
  5. contest problems on my site
    By DavidP in forum Contests Board
    Replies: 4
    Last Post: 01-10-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