Hi,

I hope someone can help me with the following prob..

I need to implement a hashtable whose KEYs are strings and VLAUEs are
again hashtables.
ie key - is a string and value -is another hashtable .

I used Rogwave library class RWTValHashDictionary for iplementing the
hashtable.Singe level hashtable is working fine.(ie where there is no
nesting..)

But when i am trying to put a hashtable as the value for the outer
hashtable, i am getting the following errors..

$ CC -compat -o xsttest -library=rwtools7,iostream
-I/opt/SUNWspro/WS6U2/include
/ -L/opt/SUNWspro/lib/ testHash.cpp
"/opt/SUNWspro/prod/include/CC/rw7/rw/tasslnk.cc", line 59: Error:
Could not fin
d RWTValHashDictionary<RWCString, RWDate>::RWTValHashDictionary() to
initialize
value_.
"/opt/SUNWspro/prod/include/CC/rw7/rw/tvsldict.cc", line 68:
Where: While in
stantiating "RWTValAssocLink<RWCString,
RWTValHashDictionary<RWCString, RWDate>>
::RWTValAssocLink(const RWCString&)".
"/opt/SUNWspro/prod/include/CC/rw7/rw/tvsldict.cc", line 68:
Where: Instanti
ated from RWTValSlistDictionary<RWCString,
RWTValHashDictionary<RWCString, RWDat
e>>::operator[](const RWCString&).
"/opt/SUNWspro/prod/include/CC/rw7/rw/xvhdict.cc", line 148:
Where: Instanti
ated from RWTValHashDictionary<RWCString,
RWTValHashDictionary<RWCString, RWDate
>>::operator[](const RWCString&).
"/opt/SUNWspro/prod/include/CC/rw7/rw/xvhdict.h", line 186: Where:
Instantia
ted from non-template code.
1 Error(s) detected.





The program testHash.cpp is as below....

#include <rw/tvhdict.h>
#include <rw/cstring.h>
#include <rw/rwdate.h>
#include <rw/rstream.h>

main() {
RWTValHashDictionary<RWCString,RWTValHashDictionary<RWCString,RWDate>
> clecHa
sh(RWCString::hash);

RWTValHashDictionary<RWCString,RWDate> preorderHash(RWCString::hash);
preorderHash.insertKeyAndValue("sreeraj", RWDate(2, "Nov", 1980));
preorderHash.insertKeyAndValue("sraj", RWDate(6, "Nov", 1986));

RWTValHashDictionary<RWCString,RWDate>
preorderHash1(RWCString::hash);
preorderHash1.insertKeyAndValue("sreeraj", RWDate(2, "Nov", 1987));
preorderHash1.insertKeyAndValue("sraj", RWDate(6, "Nov", 1989));

clecHash.insertKeyAndValue("APIT",preorderHash);
clecHash.insertKeyAndValue("ICC",preorderHash1);

RWTValHashDictionary<RWCString,RWDate> pre_hash(RWCString::hash); //
from the m
ain Hash !
RWBoolean fl =clecHash.findValue("ICC",pre_hash);
if(fl)
{
RWDate bday;
RWBoolean fl1 = pre_hash.findValue("sraj",bday);
if(fl1)
cout<<bday;
}

return 0;
}



Hope someone can help with some suggestions..

Thanks in advance
sreeraj