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::In depHTable()
{
word.clear();
defList=NULL;
}
or something like
this?
IndepHTable::In depHTable(dicti onary l)
{
for(int i=0;i<29;i++)
{
l[i].word.clear();
l[i].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::In depHTable()
{
word.clear();
defList=NULL;
}
or something like
this?
IndepHTable::In depHTable(dicti onary l)
{
for(int i=0;i<29;i++)
{
l[i].word.clear();
l[i].defList=NULL;
}
}
i tried but none of the work. can someone help me out?
thanks
Comment