Search:

Type: Posts; User: Linell Bonnette

Search: Search took 0.01 seconds.

  1. This sounds like something that would be easier...

    This sounds like something that would be easier to do with something other than arrays...as mentioned above, you could use a map.

    You could do a struct of users. Each user would have a balance and...
  2. Replies
    1
    Views
    3,095

    Insertion Sort with Linked Lists

    The code I have isn't right, and I know it. However, I've spent a few hours on this and don't know what else to do. I know the basics of insertion sort, but linked lists confuse me.

    In other...
  3. Replies
    13
    Views
    2,363

    What should I pass through to it? I've tried...

    What should I pass through to it? I've tried passing a nine through, which should work, right? Same problem.
  4. Replies
    13
    Views
    2,363

    Here it is in its entirety: /* ...

    Here it is in its entirety:


    /*

    Linell
    Due on 11/11/11 <- I'm totally getting Skyrim
    at 11:59 tonight.

    */
  5. Replies
    13
    Views
    2,363

    Thank you for all of the responses! However,...

    Thank you for all of the responses!

    However, when I tried to do this the simplest way that I could (simply making n equal to the size of the array I'm testing for), it still doesn't do anything....
  6. Replies
    13
    Views
    2,363

    Heapify

    I've tried to make a few different heapify functions, but none of them have worked. Why isn't this actually doing anything?


    void heapify(int array[], int i) {
    int largest = 0;
    int temp...
  7. Replies
    10
    Views
    4,249

    I was thinking that I would have to get to the...

    I was thinking that I would have to get to the stack class from main. Would I be able to just have that done inside of the stack class?

    I've changed the code to be
    class stack
    {
    public:
    ...
  8. Replies
    10
    Views
    4,249

    So I would start off with the something like ...

    So I would start off with the something like
    int data = new int [CAPACITY], right? After that, during the push
    (if q1.queue_size() >= s2->CAPACITY) {resize_capacity(2);} , or something along...
  9. Replies
    10
    Views
    4,249

    We're not allowed to use vector and deque. I'm...

    We're not allowed to use vector and deque.

    I'm missing a dynamic array, mostly. I need to have it somehow allocated at run-time. My main problem is that I'm not sure how I can pass the capacity...
  10. Replies
    10
    Views
    4,249

    I'm trying to take this non-dynamic array and...

    I'm trying to take this non-dynamic array and make it dynamic.
  11. Replies
    10
    Views
    4,249

    Making Stack via Dynamic Array

    I can't wrap my head around how I would implement the following code using a dynamic array. Two stacks from this class will be used to make a queue class.

    I know how dynamic arrays work, but...
  12. Replies
    7
    Views
    4,661

    void bag::operator -=(const bag& sub) //...

    void bag::operator -=(const bag& sub)
    // Library facilities used: cstdlib, node1.h
    {
    node *cursor;
    for (cursor = sub.head_ptr; cursor != NULL; cursor = cursor-> link()...
  13. Replies
    7
    Views
    4,661

    Sorry for the confusion. The order does not...

    Sorry for the confusion. The order does not matter, it simply seeks to remove any matching element. If there are items found in b2 that aren't found in b1, then it shouldn't be found in b3-which is...
  14. Replies
    7
    Views
    4,661

    Linked List Subtraction

    I'm trying to overload the - and -= operators for use on a linked list. I need to be able to subtract two linked lists. So if, as an example, I had
    {2,2,2,3,2,2,1} - {2,2,3} I would get
    {2,2,2,1}...
  15. Replies
    4
    Views
    2,633

    Where is the variable x coming from? You open the...

    Where is the variable x coming from? You open the file and you go into a loop, but you don't actually read in x. Put a priming read (read in x) before the while loop and then read in another x at the...
Results 1 to 15 of 15