i can´t include hash_map

Joined
Mar 3, 2008
Messages
1
Reaction score
0
i have this code in a library file (ffont.h)

#ifndef FFONT_H_FILE
#define FFONT_H_FILE

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

#include <vector>
#include <hash_map>

typedef FlashIDFactory FlashFontIDFactory;
typedef FlashIDEnabled FlashFontIDEnabled;

#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 FlashTagDefineFontInfo : public FlashTag
{
DEFINE_RW_INTERFACE
public:
FlashTagDefineFontInfo(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, FlashTagDefineFontInfo &data);
friend N_STD::eek:stream &operator << (N_STD::eek:stream &out, FlashTagDefineFontInfo &data);

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


class FlashTagDefineFont : public FlashTag, public FlashFontIDEnabled
{
DEFINE_RW_INTERFACE
public:
FlashTagDefineFont() {}

int AddShape(FlashShape& shape);
int AddShape(FlashShape& shape, int glyphId);
int GetGlyphId(int glyph);

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

friend N_STD::istream &operator >> (N_STD::istream &in, FlashTagDefineFont &data);
friend N_STD::eek:stream &operator << (N_STD::eek:stream &out, FlashTagDefineFont &data);
private:
std::hash_map<int, int> glyphs;
N_STD::vector<FlashShape> shapes;
};

Always have this errors messages:

Error 2 error C2039: 'hash_map' : is not a member of 'std' e:\copia de proyects open source\\vscap20s\producer\swfsource\FFont.h 55
Error 3 error C2143: syntax error : missing ';' before '<' e:\copia de proyects open source\\vscap20s\producer\swfsource\FFont.h 55
Error 4 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\copia de proyects open source\\vscap20s\producer\swfsource\FFont.h 55
Error 5 error C2238: unexpected token(s) preceding ';' e:\copia de proyects open source\\vscap20s\producer\swfsource\FFont.h 55
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top