Hey everyone. I am attemtping to build a heap. The problem with
this code is that if the heap is not the max size, the last element
is not percolated up. Any ideas how to fix this code to do...
Type: Posts; User: Jamie32
Hey everyone. I am attemtping to build a heap. The problem with
this code is that if the heap is not the max size, the last element
is not percolated up. Any ideas how to fix this code to do...
Thanks for all the help guys.
I tried the while(sin) {} it still is doing it. I think it may be the file. The thing is, this is the one I have to use for the project. :(. Here is the full code
void LList::read(string...
I am using SunOS 5.8 with g++ 2.95.3. I have also tried to get it to work on a FreeBSD box. Would it help if I posted the full code (quite long) ?
Thanks.
I am reading data from a file which I store in a linked list. However, for some reason when reading the list
I get an extra "node".
Here is my code.
// while not the end of the files keep...
I have this sort, can someone tell me why the code it not sorted correctly. Here is an example run of it.
Enter coefficient and exponent (0 0 to stop):9 8
Enter coefficient and exponent (0 0 to...
hk_mp5kpdw I did that with list. But when I go to print it out I get the same list printed. Here is my method
void LList::print() {
listNode *temp;
temp = head;
while(temp != NULL)...
Trying to sort a linked list. I have two classes.
class listNode {
public:
int coef;
int expo;
listNode *next;
};
class LList {
I need to take in any arbitrary amount of integers on one line. Like "enter integers:" 2 3 4 1 5
I do not know the amount that will be entered, so I am not sure how to go about doing this. I have...