CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    4

    compiling map template

    I 'm trying to compile a program using the map template from the standard template library. However, it will not compile and keep receiving syntax errors. What am I doing wrong?


    My code:

    #ifndef EVALUATOR_H
    #define EVALUATOR_H

    #ifdef _MSC_VER
    #pragma warning (disable: 4786)
    #endif

    #include <string>
    #include <map>

    using namespace Coyote;

    namespace Coyote
    {
    struct VarName
    {
    char Text[255];
    };


    class Evaluator
    {
    private:
    map<VarName, double, less<VarName>> Vars;
    }
    }

    #endif



  2. #2
    Join Date
    Sep 1999
    Location
    NJ
    Posts
    1,299

    Re: compiling map template

    map<VarName, double, less<VarName> > Vars;
    // put a space between the two >'s
    // or the compiler gets confused




    Truth,
    James
    http://www.NJTheater.com
    http://www.NovelTheory.com
    I don't do it for the points (OK, maybe I do), but rating a post is a good way for me to know if I helped.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured