Natural Mergesort

This is a discussion on Natural Mergesort within the C Programming forums, part of the General Programming Boards category; Code: void merge(int a[], int b[], int lo, int hi, bool asc, int *comp) { /* ...snip... */ /* comp ...

  1. #31
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Code:
    void merge(int a[], int b[], int lo, int hi, bool asc, int *comp)
    {
            /* ...snip... */
            /* comp = &comparisons; */
            *comp = comparisons;
    }
    That's more of what you're looking for.


    Quzah.
    Hope is the first step on the road to disappointment.

  2. #32
    Registered User
    Join Date
    Sep 2006
    Posts
    51
    Gosh! how silly of me!.... thank you!!
    I have to really read up on '*' and '&' operators for pointers...

    My utmost gratitude expressed : Thank you everyone!!

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mergesort in C
    By Oduig in forum C Programming
    Replies: 2
    Last Post: 09-14-2008, 11:30 AM
  2. How do I do MergeSort versus QuickSort instead?
    By dxfist in forum C++ Programming
    Replies: 9
    Last Post: 03-06-2008, 11:12 AM
  3. Mergesort
    By swanley007 in forum C++ Programming
    Replies: 6
    Last Post: 10-26-2005, 11:45 PM
  4. Linked Lists + MergeSort....(how?)
    By JoshR in forum C++ Programming
    Replies: 4
    Last Post: 06-03-2005, 02:40 PM
  5. natural leg movement
    By DavidP in forum Game Programming
    Replies: 32
    Last Post: 01-11-2004, 08:01 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21