Afficher un message
Vieux 16/10/2007, 08h22   #1
djm
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut making a struct array NULL?

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[i].word.clear();
l[i].defList=NULL;
}
}

i tried but none of the work. can someone me out?
thanks

  Réponse avec citation
 
Page generated in 0,05443 seconds with 9 queries