Search:

Type: Posts; User: Jamie32

Search: Search took 0.01 seconds.

  1. Thread: Heapify

    by Jamie32
    Replies
    0
    Views
    9,979

    Heapify

    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...
  2. Thread: file i/o help

    by Jamie32
    Replies
    7
    Views
    1,217

    Thanks for all the help guys.

    Thanks for all the help guys.
  3. Thread: file i/o help

    by Jamie32
    Replies
    7
    Views
    1,217

    I tried the while(sin) {} it still is doing it. I...

    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...
  4. Thread: file i/o help

    by Jamie32
    Replies
    7
    Views
    1,217

    I am using SunOS 5.8 with g++ 2.95.3. I have also...

    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.
  5. Thread: file i/o help

    by Jamie32
    Replies
    7
    Views
    1,217

    file i/o help

    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...
  6. Thread: Linked list

    by Jamie32
    Replies
    4
    Views
    799

    Linked list

    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...
  7. Replies
    3
    Views
    1,133

    hk_mp5kpdw I did that with list. But when I go 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)...
  8. Replies
    3
    Views
    1,133

    Sorting a linked list.

    Trying to sort a linked list. I have two classes.
    class listNode {
    public:
    int coef;
    int expo;
    listNode *next;
    };


    class LList {
  9. Replies
    3
    Views
    1,990

    multiple integer input

    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...
Results 1 to 9 of 9