typedef error messages

This is a discussion on typedef error messages within the C++ Programming forums, part of the General Programming Boards category; trying to compile and gettings these errors regarding the listed typedef line. ideas? Code: typedef map<std::string, int, less<std::string>> Wordcount; Wordcount ...

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    128

    typedef error messages

    trying to compile and gettings these errors regarding the listed typedef line. ideas?

    Code:
    typedef map<std::string, int, less<std::string>> Wordcount;
    Wordcount wc;
    
    
    c:\...\find.h(5) : error C2143: syntax error : missing ';' before '<'
    c:\...\find.h(5) : error C2059: syntax error : '<'
    c:\...\find.h(6) : error C2146: syntax error : missing ';' before identifier 'wc'
    c:\...\find.h(6) : error C2501: 'Wordcount' : missing storage-class or type specifiers
    c:\...\find.h(6) : fatal error C1004: unexpected end of file found

  2. #2
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    Code:
    typedef std::map<std::string, int, std::less<std::string> > Wordcount;
    Wordcount wc;
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    128
    thanks.
    Last edited by FoodDude; 08-25-2005 at 01:29 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Need help understanding info in a header file
    By hicpics in forum C Programming
    Replies: 8
    Last Post: 12-02-2005, 11:36 AM
  3. Please STICKY this- vital to MSVC 6 dev - BASETSD.h
    By VirtualAce in forum Game Programming
    Replies: 11
    Last Post: 03-15-2005, 08:22 AM
  4. build errors migrated from dx9b to dx9c sdk
    By reanimated in forum Game Programming
    Replies: 4
    Last Post: 12-17-2004, 06:35 AM
  5. oh me oh my hash maps up the wazoo
    By DarkDays in forum C++ Programming
    Replies: 5
    Last Post: 11-30-2001, 11:54 AM

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