- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
12 Posted Topics
My program is required to build a binary search tree using integers inputted from a file. It also searches for items and counts the nodes accessed in each search. Also it needs to calculate the average number of comparisons per search. I am not sure where to insert the counts … | |
I would like to know what would be the best way to count the nodes accessed while searching for an item in a binary search tree. I have to keep a tally for each item I search for. I have included my search method from my program. [code=cplusplus] void BinarySearchTree::find(int … | |
The requirements for my program is to input a set of substrings into a vector and produce permutations/ combinations of the substrings. The resulting strings must be an integer multiple of the length of the inputted substrings. My program only produces permutations of each substring with no replicates. i.e I … | |
Can anyone suggest an algorithm or function to generate combinations/ permutations of a group of substrings stored in a vector. The substrings consists of 3 letters and the resulting string combinations should be of a size that is a multiple of 3. | |
I am having trouble formatting my output of decimal to binary conversions in the format of XXXX XXXX and XX for hexadecimal using numbers 0 to 300. Does anyone have any ideas? Thanks in advance. Here is a copy of my output. DECIMAL BINARY HEXADECIMAL 0 0 0 1 1 … | |
Thanks to those guys who helped me out yesterday. I have one more problem; my print function for the queue program doesnt work and goes into an endless loop. Also I am unable to calculate the length of my queue. I started getting compilation errors when I included a length … | |
Could someone check my code as to why my print function is not working? Also my pop member function is getting an error in main. [code] template<class Type> void Novice<Type>::Print() { while(! IsEmpty()) { std::cout << topPtr->item; topPtr = topPtr ->next; } } template<class Type> void Novice<Type>::Pop(Type &y) { if(IsEmpty()) … | |
I have created a project with about 7 files including 3 header files and 3 implementation files. I am getting a multiple definition error when compiling for one specific file of class. I have checked that if there is more than one allocation of storage for identifiers, this error arises. … | |
I am attempting to search a list to check whether an item is already present before inserting. I am having trouble with the pointers; I understand that I need to set the pointer to the start of list but I keep getting compilation errors. Can anyone help? Here is my … | |
I would like to write a program that creates a relational database that handles queries using only C++. What would be the most appropriate method? Using arrays, linked lists or something else? Please advise. | |
Can anyone help? here is my code: passing an array base list to a function and search for an item. [code=c] #include <iostream> #include <fstream> const int MAX_LENGTH = 10; using namespace std; class IntList { public: IntList(); void GetList(ifstream &data); void PrintList(); int LengthIs(); private: int length; int values[MAX_LENGTH]; … | |
I have a program that creates a linked list and is required to count the number of elements in the list. This is what I have thus far. [code=c] #include <iostream> using namespace std; struct listrec { int value; struct listrec *next; }; listrec e1,e2,e3; int listsize(listrec); struct listrec* temp; … |
The End.