| | |
Combining arrays?? Need Help
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jan 2008
Posts: 3,844
Reputation:
Solved Threads: 503
•
•
•
•
I've got 5 arrays each with one number in them, but in order to sort them using the insertion method, I need to combine them into a single array. How do I do this? This is the last part of my program and can't figure it out!
a = {1} and an array b = {6}, you want to make an array c = {1, 6}, except there are five arrays, not two? All this prior to the sort? •
•
Join Date: Sep 2008
Posts: 12
Reputation:
Solved Threads: 0
starting from the top left, my array goes as so.
group# BM Shear Torsion
LBS[0] LBS[1] LBS[2] LBS3]
LBS[4] LBS[5] LBS[6] LBS[7]
LBS[8] LBS[9] LBS[10] LBS[11]
Ultimately I need to use insertion sort, to sort the group by BM, Shear, and Torsion. Example would be we are sorting by BM, so it would look like this. LBS[5] to LBS[1] is the order.
group# BM Shear Torsion
LBS[4] LBS[5] LBS[6] LBS[7]
LBS[8] LBS[9] LBS[10] LBS[11]
LBS[0] LBS[1] LBS[2] LBS3]
group# BM Shear Torsion
LBS[0] LBS[1] LBS[2] LBS3]
LBS[4] LBS[5] LBS[6] LBS[7]
LBS[8] LBS[9] LBS[10] LBS[11]
Ultimately I need to use insertion sort, to sort the group by BM, Shear, and Torsion. Example would be we are sorting by BM, so it would look like this. LBS[5] to LBS[1] is the order.
group# BM Shear Torsion
LBS[4] LBS[5] LBS[6] LBS[7]
LBS[8] LBS[9] LBS[10] LBS[11]
LBS[0] LBS[1] LBS[2] LBS3]
•
•
Join Date: Jan 2008
Posts: 3,844
Reputation:
Solved Threads: 503
•
•
•
•
starting from the top left, my array goes as so.
group# BM Shear Torsion
LBS[0] LBS[1] LBS[2] LBS3]
LBS[4] LBS[5] LBS[6] LBS[7]
LBS[8] LBS[9] LBS[10] LBS[11]
Ultimately I need to use insertion sort, to sort the group by BM, Shear, and Torsion. Example would be we are sorting by BM, so it would look like this. LBS[5] to LBS[1] is the order.
group# BM Shear Torsion
LBS[4] LBS[5] LBS[6] LBS[7]
LBS[8] LBS[9] LBS[10] LBS[11]
LBS[0] LBS[1] LBS[2] LBS3]
You said you had five arrays, each with one number in it. I see one array with twelve numbers in it. Where are the five arrays?
![]() |
Similar Threads
- comine 2 array togetger by column (Python)
- Have you seen this algorithm before? (Computer Science)
- string comparisions (C++)
Other Threads in the C++ Forum
- Previous Thread: Please help with link list reading back the list
- Next Thread: Arrays (game scores)
Views: 525 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll encryption error file forms fstream function functions game getline givemetehcodez google graph homeworkhelper iamthwee ifstream input int integer java lazy lib linkedlist linux loop looping loops map math matrix memory microsoft newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort string strings struct studio system template templates test text tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






