I can compile with hash_map

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • joseysaac
    New Member
    • Mar 2008
    • 1

    I can compile with hash_map

    i have this code in a archive called ffont.h

    #ifndef FFONT_H_FILE
    #define FFONT_H_FILE

    #include "FBase.h"
    #include "FShape.h"

    #include <vector>
    #include <hash_map>

    typedef FlashIDFactory FlashFontIDFact ory;
    typedef FlashIDEnabled FlashFontIDEnab led;

    #define FTDFI_UNICODE (1 << 5)
    #define FTDFI_SHIFTJIS (1 << 4)
    #define FTDFI_ANSI (1 << 3)
    #define FTDFI_ITALIC (1 << 2)
    #define FTDFI_BOLD (1 << 1)
    #define FTDFI_WIDECODES (1)

    class FlashTagDefineF ontInfo : public FlashTag
    {
    DEFINE_RW_INTER FACE
    public:
    FlashTagDefineF ontInfo(char *_str, unsigned char _flags, UWORD id) : str(_str), flags(_flags), FontID(id) {}

    void AddCode(UWORD code) { codes.push_back (code); }

    friend N_STD::istream &operator >> (N_STD::istream &in, FlashTagDefineF ontInfo &data);
    friend N_STD::ostream &operator << (N_STD::ostream &out, FlashTagDefineF ontInfo &data);

    private:
    UWORD FontID;
    N_STD::vector<U WORD> codes;
    gc_vector<char *> strings;
    char *str;
    unsigned char flags;
    };


    class FlashTagDefineF ont : public FlashTag, public FlashFontIDEnab led
    {
    DEFINE_RW_INTER FACE
    public:
    FlashTagDefineF ont() {}

    int AddShape(FlashS hape& shape);
    int AddShape(FlashS hape& shape, int glyphId);
    int GetGlyphId(int glyph);

    int GetShapeCount() { return shapes.size(); }

    friend N_STD::istream &operator >> (N_STD::istream &in, FlashTagDefineF ont &data);
    friend N_STD::ostream &operator << (N_STD::ostream &out, FlashTagDefineF ont &data);
    private:
    std::hash_map<i nt, int> glyphs;
    N_STD::vector<F lashShape> shapes;
    };

    Here is the sentence:
    std::hash_map<i nt, int> glyphs;

    And always appears thid error ´message:

    Error 94 error C2039: 'hash_map' : is not a member of 'std' e:\copia de proyects open source\camstudi o-2.0-src\vscap20s\pr oducer\swfsourc e\FFont.h 55

    Is C++, Visual.Net 2005,
    this error is in an archive called ffont.h.
    i can´t include hash_map in my project
    i don´t know why?
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    hash_map is not an ANS C++ container.

    Microsoft has put this in the stdex namespace.

    Comment

    Working...