![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 | |
|
Professional Programmer
Join Date: May 2006
Location: UK - London
Posts: 333
Rep Power: 3
![]() |
checking str*[] against NULL
When testing if something is NULL does it mean to see if something exists in that memory location, if that is (if not then please do explain) so then why is that am getting an error when i try to see if a struct*[] != NULL. here is the error that i have received.
error C2676: binary '!=' : 'HashTable' does not define this operator or a conversion to a type acceptable to the predefined operator struct HashTable
{
int age;
static HashTable* table[5];
HashTable* next;
int createHash(char*, int);
void insert(int,int);
};
HashTable* HashTable::table[5];
void HashTable::insert(int position, int data)
{
if((*table)[position] != NULL)//error is on this line
{
HashTable* current = new HashTable;
}
}
__________________
Quote:
|
|
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| dev c++ software, template problem | cairo | C++ | 11 | Jun 2nd, 2006 1:42 PM |
| Winapi get textbox | jayme | C++ | 6 | Jan 16th, 2006 8:02 PM |
| My first WIN32 API application | ivan | Show Off Your Open Source Projects | 27 | Jan 6th, 2006 6:04 PM |
| Prog hangs when entering new loop... | layer | C++ | 1 | May 6th, 2005 7:59 AM |
| airport Log program using 3D linked List : problem reading from file | gemini_shooter | C++ | 0 | Mar 2nd, 2005 5:12 PM |