![]() |
| ||
| Using Bubble sort to sort Arrays please help I just learned about bubble sort and still don't know how to make it work in my program I hope someone can help me. This is my task I should use parallel arrays (of size 20) for student name, student number, test score, and letter grade. The list must be sorted in alphabetical order by student name. I have the program up and running...I just can't get it to sort at all. This is what I got #include <iostream> |
| ||
| Re: Using Bubble sort to sort Arrays please help You are going to have to add more parameters to the bubble sort function. When the primary array members are exchanged, all the other array members must also be exchanged so that all the arrays are kept in sync with each other. Example: void bubbleSort(string Name[], int id[], float grade[], char letter[]) |
| ||
| Re: Using Bubble sort to sort Arrays please help What is <snip>? and thank you i will try it |
| ||
| Re: Using Bubble sort to sort Arrays please help <snip> means I intentially omitted code, such as snip it with a pair of sizzers. |
| ||
| Re: Using Bubble sort to sort Arrays please help ok when ever i compile and try to run this program my computer windows cuts the program off...but without this bubble thing my computer runs it fine...I don't understand? windows says that the program has stopped working...then it trys to find solution to problem...? |
| ||
| Re: Using Bubble sort to sort Arrays please help This is the updated version, see if you can run it. #include <iostream> |
| ||
| Re: Using Bubble sort to sort Arrays please help below is the info that is in the file "grades.txt" i had it in notepad 134 Johnson 50 156 Murray 33 145 Lowes 45 111 Adams 15 678 Wright 46 890 Smith 10 433 Price 50 344 Poirier 28 100 Pratt 44 888 Gilbert 48 677 Muroff 20 455 Malik 49 788 Halls 33 432 Scholl 38 670 Seitz 40 801 Booth 5 906 Ruffolo 43 440 Pond 47 999 Harrison 15 596 Gibbs 29 |
| All times are GMT -4. The time now is 12:17 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC