Thread: Problem when declare CArray?

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    68

    Smile Problem when declare CArray?

    I declare this CArray in Header file

    Code:
    CArray<int, int> m_arrHashFileListBoxWidth;
    When I compile, there are error message show
    error C2143: syntax error : missing ';' before '<'
    error C2501: 'CArray' : missing storage-class or type specifiers
    error C2059: syntax error : '<'
    error C2238: unexpected token(s) preceding ';'

    Do you know how to solve this problem?
    Thank you for your answer.

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793

    Re: Problem when declare CArray?

    Originally posted by ooosawaddee3
    I declare this CArray in Header file

    Code:
    CArray<int, int> m_arrHashFileListBoxWidth;
    When I compile, there are error message show
    error C2143: syntax error : missing ';' before '<'
    error C2501: 'CArray' : missing storage-class or type specifiers
    error C2059: syntax error : '<'
    error C2238: unexpected token(s) preceding ';'

    Do you know how to solve this problem?
    Thank you for your answer.
    Are you doing this as part of an MFC project?

    Have you added Afxtempl.h??

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  2. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM
  3. Laptop Problem
    By Boomba in forum Tech Board
    Replies: 1
    Last Post: 03-07-2006, 06:24 PM
  4. half ADT (nested struct) problem...
    By CyC|OpS in forum C Programming
    Replies: 1
    Last Post: 10-26-2002, 08:37 AM
  5. beginner problem
    By The_Nymph in forum C Programming
    Replies: 4
    Last Post: 03-05-2002, 05:46 PM