#include "stdafx.h" #include <iostream> #include <iomanip> #include <cstdlib> #include <ctime> #include <windows.h> #include "OBJC_DEF.h" using namespace std; void print(int *arr, int count) { for (int i = 0; i < count; ++i) { cout << arr[i] << " "; } cout << endl; } BOOL shuffle(int *outArray, int outArrayCount, int from, int to) { NSAssert((to - from + 1 == outArrayCount), @"out array count does not equal to the count based on 'from' to 'to' variable "); BOOL ret = NO; // 1. first fill the outArray as sorted value. for (int index = 0; index < outArrayCount; ++index) { outArray[index] = from + index; } srand((unsigned int) time(0)); int tempIndex = 0; int tempInt = 0; for(int i &