Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Dec 27th, 2006, 10:57 AM   #1
kruptof
Professional Programmer
 
kruptof's Avatar
 
Join Date: May 2006
Location: UK - London
Posts: 333
Rep Power: 3 kruptof is on a distinguished road
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:
When I was young it seemed that life was so wonderful,a miracle, oh it was beautiful, magical.
Now watch what you say or they'll be calling you a radical,a liberal, oh fanatical, criminal. Oh won't you sign up your name,we'd like to feel you're acceptable, respectable, oh presentable, a vegetable
kruptof is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:19 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC