No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
14 Posted Topics
I have a seg fault I can't seem to be rid of. Basically I'm building an AVL tree and I'm stuck on the insert method. gdb says it is occuring on the line with: while( temp != NULL && temp->key != k ){ Would someone please help? Thank you in … | |
I'm having a small problem. I've created a binary tree that represents an n-ary tree using the left-child and right sibling syntax. I know that preorder on the binary tree gives you the same result as if the tree weren't binary. But, how do you change postorder and levelorder so … | |
This is a method I used for adding a object, flightnode, into a linked list. Basically it takes in the value in and puts it in order based on the int flightno in the flightnode object. It works fine until a value needs to go at the end of the … | |
I need to get a MIPS program to print out the first 30 prime numbers and to compute the first 200 (strange, but its the assignment). I can figure out what's wrong with this program. All it does is print 2's out in an infinite loop and I cannot figure … | |
I'm doing this minesweeper assignment and I need help. I tried to test the findMineValues() function and it completely scrambles up my board. Can someone help me pinpoint what I am doing wrong? [CODE=cpp] #include <string> #include "Cell.h" using namespace std; Cell::Cell(){ label = 0; mine = false; flag = … | |
I tried to modify this merge sort method to sort an array of type T. Its an merge sort except iterative. I was just wondering why it wouldn't sort right? Can anyone help me out? [CODE=Java]public static <T extends Comparable<? super T>> void iterativeMergeSort(T[] input) { // Create a temporary … | |
I can add a new node if the head is empty, but I can't attach a new node. Instead I get a null pointer error. Can anyone see what I'm doing wrong. I think I've been staring at this for too long. EDIT: Forgot to say I'm adding the Nodes … | |
I pretty much got my assignment working except for one part, I need to reverse the output if the user enters "-r" in the command line. Can anyone help me with this? EDIT: By reverse I mean list the last child first down to the original process. [code] int j … | |
I seem to be able to load the files in my program. Then I can loop through the lines one time, but if I try a second loop to load the strings into an array that one won't work. Here's my code. I thank you for any help in advance. … | |
I'm trying to read in the chars for a file in order to compare two text files. The problem is I can't seem to load space characters into my vectors. Any suggestions for me? [CODE] vector<char> cyphVector; char c; //fill vector with cypher file chars while( cyphFile.good() ){ cyphFile >> … | |
Hi, its me again. I need help one last time. This time my problem is pretty simple, I just can't find it myself it seems. Please lend some assistance. Here's my assignment. [QUOTE]Create a program that takes in 2 integers and displays the result of dividing the two integers. This … | |
I need help with enums. I don't get them. This is part of a larger assignment, so all I need to do is fix this. I'm trying to assign year levels of school to constants. [code=java] public class Student extends Person { public Student( String name, String address, String phone, … | |
I didn't think I'd need help again, but I'm pretty sure its not as bad as last time. I'm trying to increment the time in Time2.class, and that compiled. The problem is I can't make a class to use it as per the assignment, and that's because I used void … | |
Hello everyone. This if my first post on the forum, and hopefully my last asking for help on an assignment. I've picked and picked at this, and now I'm going insane. I've edited this one too many times, so now I figure its one of three things. My entire approach … |