Selection Sort

I don't know what declaration to use for a selection sort of an array. Its supposed to be a deck of cards (52 integer array) Here is the code:


#include "Card.h"
#include "consmanip.h"
#include <string>
#include <iostream>
#include "Stack Array.h"
#include "Stacks.h"

using namespace std;

class Friend StackArray;

int MIN = StackArray[0]
int StackArray[52];
int[0] = 25;

{
for(unsigned int i+0, i<49, i++)
{
int k =i;

if(array[j]<MIN)
{
MIN = StackAray[j];
k = j;
}}

array[k] = array[i]
array[i] = MIN;
}
Unsure about what is the question here. You say you don't know what declaration to use, but what exactly is that you want to declare?

Just in case: http://en.wikipedia.org/wiki/Selection_sort
I'm also confused. What exactly are you asking? and you're statement at the bottom of the program for inserting the values is incorrect.
Topic archived. No new replies allowed.