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:
stream &operator << (N_STD:
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:
stream &operator << (N_STD:
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
#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:
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:
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