Thread: Problem with recursive sorting

  1. #1
    Registered User
    Join Date
    Mar 2006

    Problem with recursive sorting

    I don't want to sound like I'm too clueless to be helped, but I really don't have idea as to what the errors I'm getting mean, so I've attached the program to this post. Thanks to anyone who posts any helpful information. And yes, obviously, this is a CS assignment...which I may otherwise fail

  2. #2
    Been here, done that.
    Join Date
    May 2003
    The errors? There are thousands of errors. Any chance of getting specific? What errors?
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    #include "qsortcode.cpp"
    You shouldn't include a .cpp file directly. Search the board for more info.

    Here are the errors I get (not exactly "thousands"):
    user@3[tmp]$ g++ -W -Wall -ansi -pedantic -O2 -s -o qsorttest qsorttest.cpp
    qsorttest.cpp: In function `int main(int, char**)':
    qsorttest.cpp:119: error: `genIntDblArray' undeclared (first use this function)
    qsorttest.cpp:119: error: (Each undeclared identifier is reported only once for
       each function it appears in.)
    qsorttest.cpp:155: error: cannot convert `int*' to `double*' for argument `1'
       to `void genDblDescArray(double*, int)'
    qsorttest.cpp:15: warning: unused parameter `int argc'
    qsorttest.cpp:15: warning: unused parameter `char**argv'
    qsortcode.cpp: In function `int ChoosePivot(T*, int, int) [with T = double]':
    qsortcode.cpp:52:   instantiated from `void Partition(T*, int, int, int&) [with T = double]'
    qsortcode.cpp:106:   instantiated from `void QuickSort(T*, int, int) [with T = double]'
    qsorttest.cpp:162:   instantiated from here
    qsortcode.cpp:33: warning: converting to `int' from `double'
    Maybe that will help.

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell

    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ:

    My website:
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Recursive function problem
    By trnd in forum C Programming
    Replies: 5
    Last Post: 01-30-2009, 12:36 AM
  2. Sorting (asymptotic) complexity problem
    By Petike in forum C++ Programming
    Replies: 8
    Last Post: 01-20-2009, 07:15 AM
  3. Array Sorting problem
    By ___________ in forum C++ Programming
    Replies: 4
    Last Post: 07-22-2008, 12:17 AM
  4. Request for comments
    By Prelude in forum A Brief History of
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  5. Recursive problem...
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 02-11-2002, 04:20 PM