Thread: How do I use selectionSort algorithm to sort a string array alphabetically?

  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    2

    Question How do I use selectionSort algorithm to sort a string array alphabetically?

    I have been trying to get a selection sort algorithm to sort a string array of 20 elements alphabetically. I keep getting type mismatch among other errors. I was successful in getting an integer array of 20 elements to work so I am wondering how to modify the integer algorithm to work with strings. Find below my code and if anyone could point me in the right direction, I would be thankful. Thanks!

  2. #2
    Registered User
    Join Date
    Nov 2002
    Posts
    491
    Look at the datatype fo 'minValue', and all your temporary variables, That should be a hint.

  3. #3
    Registered User
    Join Date
    May 2003
    Posts
    2
    I want to be sure I understand what you posted. Simply changing the data type of minValue and minIndex to char would allow this to work?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Copying a string, into a string array.
    By m.mixon in forum C Programming
    Replies: 5
    Last Post: 07-31-2006, 05:19 PM
  2. RicBot
    By John_ in forum C++ Programming
    Replies: 8
    Last Post: 06-13-2006, 06:52 PM
  3. can't assign proper values to an array of string
    By Duo in forum C Programming
    Replies: 1
    Last Post: 04-04-2005, 06:30 AM
  4. Linked List Help
    By CJ7Mudrover in forum C Programming
    Replies: 9
    Last Post: 03-10-2004, 10:33 PM