Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~6K People Reached
Favorite Forums
Favorite Tags
c++ x 17
c x 1

7 Posted Topics

Member Avatar for maikens

Hi, I am having a problem with an assignment for a C++ course. I have to make a Game of Life simulator (predator and prey). There are two organisms, lion and ant, and the lions eat the ants. My problem is that for some reason I can't fathom, the lions …

Member Avatar for daianahoney
0
318
Member Avatar for maikens

Hi all, I have written a balanced binary search tree as part of an assignment (make a simple Spell Checker). Each node has, among other values, two height ints, leftHeight and rightHeight, to keep track of the heights of any subtrees. My problem is that after a rotation, the heights …

Member Avatar for maikens
0
1K
Member Avatar for maikens

Hi all, I wrote this recursive function to set the heights of each node in a search tree. It is not performing as expected; I suspect I screwed up the recursion somehow. Anyone know what the matter is? [CODE]void AVLTree::SetHeight(NodePtr &node) // root is passed in { if(node == NULL) …

Member Avatar for mrnutty
0
143
Member Avatar for lochnessmonster

[QUOTE=vijayan121;1485965]For a dynamically allocated array with [icode]new T[N][/icode], N must be non-negative; it may evaluate to zero. When N is zero, an array with no elements is allocated and a distinct non-null pointer to it is returned. This array with no elements is deleted normally; with [icode]delete[][/icode][/QUOTE] If you read …

Member Avatar for template<>
0
89
Member Avatar for maikens

Hi all, I am tryiing to figure out how to tokenize a string consisting of words in alphabetical order, all crammed together with no delimiters. I can't for the life of me see how this could be done without analyzing the string beforehand and hard coding a delimiter in. Example …

Member Avatar for pseudorandom21
0
236
Member Avatar for eclipse2012

You need to get rid of the semi colon after the function header void write_output_data(void) Otherwise the compiler thinks it's a function declaration.

Member Avatar for hag++
0
4K
Member Avatar for maikens

Hi all, I'm working on a project in my Data Structures course, using Binary Search Trees. As part of the project, we need to balance the tree. I have decided to try and make an AVL tree. I am having a problem with the rotations in particular. Somehow during the …

0
76

The End.