D
djm
hi,
lets say ive this struct array in my header file
public:
IndepHTable();
private:
struct
{
string word;
List defList;
} dictionary[TABLE_SIZE];
how can i make the elements in the array null from the constructor?
will this work?
IndepHTable::IndepHTable()
{
word.clear();
defList=NULL;
}
or something like
this?
IndepHTable::IndepHTable(dictionary l)
{
for(int i=0;i<29;i++)
{
l.word.clear();
l.defList=NULL;
}
}
i tried but none of the work. can someone help me out?
thanks
lets say ive this struct array in my header file
public:
IndepHTable();
private:
struct
{
string word;
List defList;
} dictionary[TABLE_SIZE];
how can i make the elements in the array null from the constructor?
will this work?
IndepHTable::IndepHTable()
{
word.clear();
defList=NULL;
}
or something like
this?
IndepHTable::IndepHTable(dictionary l)
{
for(int i=0;i<29;i++)
{
l.word.clear();
l.defList=NULL;
}
}
i tried but none of the work. can someone help me out?
thanks