Expand|Select|Wrap|Line Numbers
- struct hashEntry{
- int element;
- EntryType info;
- struct heapEntry *ptr;
- hashEntry( ) {}
- hashEntry( int i, EntryType t = EMPTY ) : element(i), info(t){}
- };
- struct heapEntry {
- int element;
- struct hashEntry *ptr;
- } ;
- //this array is in class binaryHeap
- vector<heapEntry> heapArray;
- //this array is in class hashTable
- vector<hashEntry> hashArray;
- void Quash::hashTable::link()
- {
- cout<< (*hashArray[0].ptr).element;
- }
Quash.cpp: In member function void Quash::hashTable::link():
Quash.cpp:153: error: invalid use of undefined type struct heapEntry
Quash.h:17: error: forward declaration of struct heapEntry
line 17 is the line:
struct heapEntry *ptr;
line 153 is the line:
cout<< (*hashArray[0].ptr).element;
Any hints?