943,712 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 657
  • C++ RSS
Sep 18th, 2008
0

Combining arrays?? Need Help

Expand Post »
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!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
swbuko is offline Offline
12 posts
since Sep 2008
Sep 18th, 2008
0

Re: Combining arrays?? Need Help

Click to Expand / Collapse  Quote originally posted by swbuko ...
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!
More details please. You want to concatenate five arrays into one? So you have an array 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?
Featured Poster
Reputation Points: 2614
Solved Threads: 687
Posting Expert
VernonDozier is offline Offline
5,372 posts
since Jan 2008
Sep 18th, 2008
0

Re: Combining arrays?? Need Help

I've got a big array of numbers called LBS[x]. It is broken up into columns like so -->

1112 10 11 12
2222 13 14 15
3332 16 17 18
Reputation Points: 10
Solved Threads: 0
Newbie Poster
swbuko is offline Offline
12 posts
since Sep 2008
Sep 18th, 2008
0

Re: Combining arrays?? Need Help

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]
Reputation Points: 10
Solved Threads: 0
Newbie Poster
swbuko is offline Offline
12 posts
since Sep 2008
Sep 18th, 2008
0

Re: Combining arrays?? Need Help

Click to Expand / Collapse  Quote originally posted by swbuko ...
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?
Featured Poster
Reputation Points: 2614
Solved Threads: 687
Posting Expert
VernonDozier is offline Offline
5,372 posts
since Jan 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Please help with link list reading back the list
Next Thread in C++ Forum Timeline: Arrays (game scores)





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC