This week's book giveaway is in the Go forum.
We're giving away four copies of Head First Go and have Jay McGavren on-line!
See this thread for details.
Win a copy of Head First Go this week in the Go forum!

Rhyeca Riley

Ranch Hand
+ Follow
since Oct 13, 2016
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rhyeca Riley

Hello gentleman and ladies,

I am working on a programming assignment (priority queue/heap sort) and we need to initialize the heap first with the given "menu" selection. If we did not initialize the heap first we need to write a statement "initialize heap first." I was going to do a simple

but I quickly realize this would not work. Any suggestions would be appreciated. (I am sure this is something basic that I am just overlooking)

As always thank you for your time in helping a beginner programmer!
2 weeks ago
Quick update:

User error (DUH).... There were two heap.h files in the same folder so it was calling the old file.
3 weeks ago
Hello all,

I am currently working on a project designed for implementing different functions for a min heap (deletemin,insert,etc.) I am currently working on my minHeapify to reorder my heap when I use deletemin. For some reason I am getting the error "Too many arguments in function call" even though there are 3 arguments and 3 arguments being satisfied. Here is a a portion of my code.



Thank you for your time and help!
3 weeks ago
I will try and write the print statements throughout to see if I can debug by myself. If not I will definitely be asking for help... thank you for your help even though I made it difficult!
1 month ago

Carey Brown wrote:So, if you aren't getting any errors, how do you know there's a problem?

When I try to use the "print function" nothing is printed out so I can only assume the "insert function" is not working as well.
1 month ago

Carey Brown wrote:I'm not sure what you're expecting from us. Impossible to say without the source code to OrderedInList and you have posted any error messages.

There are no error messages with my code. It is simply not doing what it is intended to do. If you would like me to post the code I will but the code that I need to change is some serious issues. I didnt want to post the code to avoid academic integrity violations. But as long as I don't receive help on that side i suppose it will be okay.
1 month ago
Hello everyone,

I am currently working on a homework assignment that gives code that has a lot of errors. I am trying to make a main function so I can begin error testing. The two functions that I need to test are insert, and print. This is dealing with inserting into an array of size 10 which is declared in the constructor. Currently I cannot get the insert and print calls to work at lines 37 and 45. I have provided my code to try and test the two functions... Note: I will not be providing the two functions as that is the homework assignment and I want to be able to fix it on my own. Thank you for your help!

1 month ago
Hey guys new to C++ and wondering how to update an array in a function. I am trying to update the time for a flight given in a text file. Here is the code I have so far.

If more code is needed I can upload... however I do not want to put all of my code on here to encourage others to do their homework. Thank you for your time and help.
3 months ago
Okay I think it is slowly making sense. I am going to work on it and see if I can get it figured out with the information you have given me. Thank you!
5 months ago

John Matthews just to get you going, I would replace 'struct heap {' in the .h file with:
then replace the Initialize() function in the .c file with the heap constructor:
Note that 'new' is used rather than malloc() to create an array of element objects; malloc() is more of a C thing.
Does that help? It still leaves loads of compiler errors to be fixed.

Yes this does help... I've only done 2 weeks total of C++ and another 2 weeks of C from a community college and at University I guess I was expected to know way more than what I know now. I will make this change and try to implement it to the rest of the code. THANK YOU!
5 months ago
I am trying to build, print, insert, and increase a max heap. I am completely lost and I am trying to convert pseudo code from slides to code. I would appreciate any help. Each comment explains what each function is supposed to do but if you need more information please let me know.
I would appreciate taking a look at all my code to see what is right or wrong then have help with the build max heap. I DO NOT expect answers to everything... I am lost and honestly becoming extremely stressed about this assignment. Thank you.

heap.h file

//heap.cpp file
5 months ago
I have put the pseudo code and how I interpreted it. This is a standard max heap sort algorithm that needs and array and an index

Pseudo code:

my code: Thank you for your time and help!

5 months ago
Thank you Paul! I was going to start putting in a bunch of S.O.Pln but thought I would post on here first to see if something was compltely messed up first (I often overlook "little" things)
1 year ago
I guess it would help if I told you what was wrong... The first two cases, less than and greater than are working. The only one not working is if they are equal. I am not getting a 0 but instead a -1.
1 year ago
Hey everyone was wondering if I could get some help with a method (compareTo) in my class (InfiniteInt).  I know my logic is not 100% right so I was wanting a push in the right direction. The nodes used are from a Doubly Linked List which InfiniteInt is a subclass from. (dont want to put too much of my code on here so if that is something you need I can put it). Thank you for your time/help!

1 year ago