#include <iostream>
using namespace std;
class QuickSort{
float *Array;
const int Length;
public:
QuickSort(int size);
void Initital();
~QuickSort();
int Partions(int low,int high);
void Quick(int low,int high);
void Sort();
void Print();
};
QuickSort::QuickSort(int size):Length(size){
}
void QuickSort::Initital(){
Array = new float[Length];
cout<<"Please input the Array what you want to oder"<<endl;
int it=0;
for( ; it<Length; it++ ){
cin>>Array[it];
}
}
int QuickSort::Partions(int low,int high){
int j;
float temp=Array[high];
int i=low-1;
for(j=low;j<high;j++){
if(Array[j]<=temp){
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余2页未读,立即下载