473,386 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Help with Chaining

Hello everyone,

I'm trying to recreate the C# dictionary class using binary trees for chaining. I have my binary tree class complete, and all I really need now is to connect my array with numerous instances of the binary tree class.
basically my program works like this:

-enter in a key value pair. The key value pair is stored in an array.

-If the location [key] in the array is occupied by a previous insertion, a new binary tree instance is created and the key value pair is stored there.

So if a collision calls for it, each slot in the array can have its own binary tree.

My problem is, is that I need binary tree instances to be created and named as they are required.

I'm not that experienced with C# or programming in general. The only way I could do this is create a binary tree instance for each array slot manually and give it a unique name. However, since the array's size isn't static that would not work for very long.

I hope this is semi-clear at least. Thanks for an help.
Nov 5 '08 #1
3 1279
weaknessforcats
9,208 Expert Mod 8TB
Are you writing this in C++ or C#?

If it's not C++ then you are in the wrong forum. Let me know the situation and I can move this thread if necessary.
Nov 5 '08 #2
Sorry! yes I'm in the wrong section. Great start for me here at bytes. If you could move it to a c# forum I'd appreciate it. Thanks
Nov 6 '08 #3
Ganon11
3,652 Expert 2GB
Done and done.
Nov 6 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: dinks | last post by:
Hi I'm really new to c++ so please forgive me if this is really basic but im stuck... I am trying to make a data class that uses istringstram and overloaded << and >> operators to input and output...
7
by: pkruti | last post by:
Below is a stored procedure i am working with and i am trying to drop the yesno_holding table if it exists but how do i add it back? Meaning i want it to drop if it exists but i want to add it back...
2
by: Steve R. Hastings | last post by:
While studying iterators and generator expressions, I started wishing I had some tools for processing the values. I wanted to be able to chain together a set of functions, sort of like the...
20
by: danishce | last post by:
I want to encrypt the ASCII message using Cipher Block Chaining MAC and generate the 8 byte key.How can i achieve this? Thanks: Danish Majid
0
by: dsithoo | last post by:
Hi, I have a stored procedure on database A (owner dbo) which is itself owned by dbo. It tries to do a SELECT from a table in database B (both table and db owned by dbo) but fails with: "Msg...
1
by: buburuz | last post by:
Hi, I have a question about overloading operator<< . Actually I am trying to understand how it works when chaining multiple calls to this operator. I have a very simple class (MyOut) with an...
0
by: ramadeviirrigireddy | last post by:
Can anyone tell me what is the difference between Servlet Chaining and Servlet Forward ? thanks in advance
8
by: escher4096 | last post by:
I have a class A that is inheriting from class B. Class B has a constructor that I would like to use in Class A, so I chain to it. However class B's constructor often misbehaves and it causes a...
16
dmjpro
by: dmjpro | last post by:
Hey Experts! I want to know the prototype chaining? How does it take part in Inheritance in JavaScript?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.