Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by sunhater

  1. sunhater

    2-D array inseriton sort, possible??

    So you are saying that it isn't good practice to declare the array globally because it makes the program more of a one shot deal.
  2. sunhater

    2-D array inseriton sort, possible??

    Sorry about only including the insertion sort function and I certainly don't want anyone to write out a program for me. I was just looking for a little direction, a little leading. Here is the whole code that I have so far. //using namespace std; const int rows = 3; const int cols = 10...
  3. sunhater

    2-D array inseriton sort, possible??

    I am trying to do an insertion sort program where I sort a 2-D array. I think I am close, but I keep getting so screwy data after array[1][0]. Everything in row one sorts out great and the first element in row 2 is set right, but then it just goes wild. Here's the source code that I have...
  4. sunhater

    Need a little help--- 2d array selection sort

    obislavu Unfortunately I have no idea what vectors or pointers are yet. Actually I think vectors are what is up next in my class. kmfna I sort of followed the second part. I'll study it some more and see if I can't come up with something. Thanks for the responses.
  5. sunhater

    Need a little help--- 2d array selection sort

    array[1][col] {0, 1, 2, 3, 7, 10, 12, 14, 15, 16} array[2][col] {18, 19, 20, 23, 25, 29, 34, 35, 39, 40} array[3][col] {42, 45, 65, 74, 99, 100, 109, 122, 156, 176} Is this what you're looking for?? Yes, that is what I want to do. I'll look at the other part now
  6. sunhater

    Need a little help--- 2d array selection sort

    int array[rows][cols]={ {15, 40, 25, 100, 16, 1, 10, 42, 35, 23}, {122, 14, 3, 19, 156, 45, 2, 99, 74, 65}, {0, 34, 39, 109, 176, 20, 7, 18, 29, 12} }; This is what I want sorted. I want to use the selection sort method. I know there...
  7. sunhater

    Need a little help--- 2d array selection sort

    Ok, the program below sorts the individual rows. I need it to sort all the numbers in each position, not just the rows. Any help would be appreciated. #include <iostream> using namespace std; const int rows = 3; const int cols = 10; void select_sort( ); int array[rows][cols]={...

Part and Inventory Search

Back
Top