How to define structure inside hash?
General and Desktop
5
Posts
4
Posters
2.5k
Views
1
Watching
-
Hi is it possible to define a hash function with a structure inside it?
I tried to define as shown below,....
But getting link error saying..."exited with code -1073741819"
@
class FilterColl : public QDialog
{
Q_OBJECTpublic: struct StructCheckedEntries { QString filename; QCheckBox *checkbox; QComboBox *combobox; QLineEdit *lineedit; }; QHash<QString,StructCheckedEntries *> HCheckedEntries; private: Ui::FilterColl *ui; StructCheckedEntries *structentry; };@
-
We're not talking about a hash function for your class, that would take an instance of that class and return an integer, but about dealing with an QHash based member attribute. Correct wording is essential in programming...
For the linker error, isn't there more than one single number?
-
@ QHash<QString,FilterColl::StructCheckedEntries *> HCheckedEntries;@