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
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
313
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
136
Member Avatar for lochnessmonster

after examineing this code, it seems like it actually allocates space for the pointer....but how? is this a bug? how can u allocate space for an array of 0 elements [CODE]int main() { int *ptr = new int[0]; return 0; }[/CODE]

Member Avatar for template<>
0
87
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
235
Member Avatar for eclipse2012

Hi, I am a newbie to Visual C++ programming. I already have a code which I edited for my purpose. It is as below. [CODE]#include <stdafx.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #define FIL_LINES 17873 /* no. of lines in input datafile */ double t[FIL_LINES]; double x[FIL_LINES],y[FIL_LINES],z[FIL_LINES]; double …

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
74