desesperado
Publicado por ima (36 intervenciones) el 11/07/2001 13:03:43
Hola!
#include <hash_map.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
struct eqstr
{
bool operator()(const char* s1, const char* s2) const
{
return strcmp(s1, s2) == 0;
}
};
hash_map<const char*, int, hash<const char*>, eqstr> months;
months["may"] =31;
months["june"] =5;
............................................................
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Quiero que esa tabla hash sea memoria estatica.
Se puede hacer eso.
Gracias!
#include <hash_map.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
struct eqstr
{
bool operator()(const char* s1, const char* s2) const
{
return strcmp(s1, s2) == 0;
}
};
hash_map<const char*, int, hash<const char*>, eqstr> months;
months["may"] =31;
months["june"] =5;
............................................................
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Quiero que esa tabla hash sea memoria estatica.
Se puede hacer eso.
Gracias!
Valora esta pregunta


0