Hi,
I have to create a map table in C.
I have used the following codes :
**************************************
#include <map.h>
using namespace std;
map <char,char> fileMap;
fileMap.clear();
CL_LOG_INFO(" Putting into HASH MAP");
// Storing into the map
fileMap.insert(make_pair(key_xsd,key_moc));
CL_LOG_DEBUG("hash table");
CL_LOG_DEBUG(fileMap);
*************************************
I am getting following compilation errors :
snmpd.c:379:17: error: map.h: No such file or directory
snmpd.c:381: error: syntax error before 'namespace'
snmpd.c:381: warning: data definition has no type or storage class
snmpd.c: In function 'mapfile_initialize':
snmpd.c:1044: error: 'map' undeclared (first use in this function)
snmpd.c:1044: error: (Each undeclared identifier is reported only once
snmpd.c:1044: error: for each function it appears in.)
snmpd.c:1044: error: syntax error before 'char'
snmpd.c:1070: warning: passing argument 1 of 'strcmp' makes pointer from integer without a cast
snmpd.c:1094: error: 'fileMap' undeclared (first use in this function)
What can I do.. Is there any other way this can be done?I am running a c++ compiler so I was expecting it to work.It is not recognising map.h or map in that case.I am new to c++ programming so need some help.
Nisha