473,834 Members | 2,319 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I can compile with hash_map

1 New Member
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?
Mar 3 '08 #1
1 2835
weaknessforcats
9,208 Recognized Expert Moderator Expert
hash_map is not an ANS C++ container.

Microsoft has put this in the stdex namespace.
Mar 3 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

11
9991
by: Florian Liefers | last post by:
"Hello World\n", i get error C2143 (Syntaxerror, missing ';' before '<') using the following code: #include <hash_map> struct eqstr { bool operator()(const char* s1, const char* s2) const
3
11883
by: Mark | last post by:
Hi, I'm trying to use hash_map (gcc 3.2.2) with a std::string as the key. It will compile if I use <map> but I get a bunch of template compile errors when I change it to hash_map. Any suggestions? My program and the errors are below... #include <ext/hash_map> #include <string>
5
8627
by: peter_k | last post by:
Hi I've defined hash_map in my code using this: ------------------------------------------- #include <string> #include <hash_map.h> & namespace __gnu_cxx {
9
4188
by: collection60 | last post by:
I've been developing some Unix based shell tools. They work fine on Linux and MacOSX. I want to compile them on Win32. But I can't get hash_map to compile. I tried downloading stl (and stlport) which is supposed to work in MSVC, but it doesn't, it just generates tons of errors for stuff that used to work just fine. Where do I get fts.h to compile and dirent.h compile?
3
3846
by: kony | last post by:
Hi there, I would much appreciate your help with the following problem. Below is the code that uses a hash_map. I want to release all the memory occupied by the hash_map for other use. Apparently clear() function is not working and the trick with swap() is half working. Does anybody know how to deallocate the hash_map? Thanks in advance. Kon #include <functional>
1
9407
by: jayesah | last post by:
Hi All, I am developing my code with Apache stdcxx. I am bound to use STL of Apache only. Now today I need hash_map in code but as I learned, it is not available in Apache since it is not standard c++. Though it is available with GNU STL. The code module where I use hash_map will generate separate object file during compilation. This code module is also using STL string.
4
3418
by: James Kanze | last post by:
On Jul 16, 10:53 pm, Mirco Wahab <wa...@chemie.uni-halle.dewrote: It depends. You might like to have a look at my "Hashing.hh" header (in the code at kanze.james.neuf.fr/code-en.html---the Hashing component is in the Basic section). Or for a discussion and some benchmarks, http://kanze.james.neuf.fr/code/Docs/html/Hashcode.html. (That article is a little out of date now, as I've tried quite a few more hashing algorithms. But the...
5
3378
by: frankw | last post by:
Hi, I have a hash_map with string as key and an object pointer as value. the object is like class{ public: float a; float b; ...
2
8155
by: marek.vondrak | last post by:
Hi, I am wondering if there are any functional differences between SGI's hash_map and tr1's unordered_map. Can these two containers be interchanged? What would it take to switch from hash_map to unordered_map? Thank you. -Marek
0
10786
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10503
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10214
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7754
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5790
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4425
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3973
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3079
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.