Im using a recursive function to sort array. The decrement operator is used to eventually get to base condition in function. Used debugger the size-- expression is not decrementing. I figured out how to fix it but dont quite understand it.
[coed]#include "stdafx.h"
#include <iostream>
void selectionsort(int [], int);
int main()
{
using namespace std;
const int arrysize = 10;
int srtarry[arrysize] = {50,80,100,150,10,20,90,1,15,35};
int j;
1. the variable is never used after that line
2. after that line, the variable is not used again
3. post decrement returns the old value from before the decrement
4. you pass that old value to the function