473,785 Members | 2,283 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with Chaining

2 New Member
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 1302
weaknessforcats
9,208 Recognized Expert Moderator Expert
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
KLonergan
2 New Member
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 Recognized Expert Specialist
Done and done.
Nov 6 '08 #4

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

Similar topics

4
2331
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 data. The data comes in string lines like "OREBlegQ 14854 731.818" which need to be split into a string, int and double when stored in the class. Can anyone help? This is what i have so far: /* Begin Code */ #include <sstream>
7
3985
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 if it doesnt exist. the reason why i have to drop it is because when i run the stored procedure it creates mulitple rows with the values in them but in my report it takes the top row and insert those values into the report and i dont want that i...
2
1672
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 "pipelines" you can make with command-line programs. So, I wrote a module called iterwrap.py. You can download it from here: http://home.blarg.net/~steveha/iterwrap.tar.gz
20
6066
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
1537
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 229, Level 14, State 5, Procedure <stored_procedure_name>, Line 210 The SELECT permission was denied on the object '<table_name>', database 'B', schema 'dbo'" Cross-database ownership chaining is enabled on both databases, and what's strange is...
1
2703
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 overloaded operator<<, which takes a string as input parameter and returns a reference to an ostream object (std::cout in this case). In the main file I instantiate an object of MyOut and then write a message to console in two different ways: 1....
0
1023
by: ramadeviirrigireddy | last post by:
Can anyone tell me what is the difference between Servlet Chaining and Servlet Forward ? thanks in advance
8
2027
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 mess and throws a meaningless error. I would like to wrap the call to class B's constructor in a try/catch so that I can at least throw something of use. I can't see how I would do this with chaining however. Everything that class B calls in its...
16
1973
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
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10147
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9946
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.