Q:

Quicksort algorithm not functioning properly

#include <iostream>

#include <string>

using namespace std;

//Iterates over the string array appNames displaying each application 
//name in a separate line. There are appCount elements in the array

void displayAllApplicationNames(string appNames[], int appCount);

//Swaps strings in string array appNames between appIndex1 and appIndex2

void swapAppNames(int appIndex1, int appIndex2, string appNames[]);

//Splits string array appNames around a pivot index p (the pivot). 
//Elements below index p are less than elements above index p. 
//The function returns the pivot p

int  pivot(int first, int last, string appNames[]);

//Implements the QuickSort algorithm to sort string array 
//appNames between indeces first and last

void quickSort(int first, int last, string appNames[]);

void main()

{

    string appNames[] =

    {

        "4) Pages", "2) Keynote", "3) Numbers",

        "8) Word", "5) PowerPoint", "1) Excel",

        "0) Documents", "6) Presentation", "7) Sheets"

    };

    displayAllApplicationNames(appNames, 9);

    swapAppNames(3, 6, appNames);

    displayAllApplicationNames(appNames, 9);

    quickSort(0, 8, appNames);

    displayAllApplicationNames(appNames, 9);

     getchar();

}

void displayAllApplicationNames(string appNames[], int appCount)

{   

        for(appCount = 0; appCount <= 8; appCount++)
        {

        cout << "[" << appCount << "]\t"<< appNames[appCount] << endl;

        }

        if( appCount < 0 || appCount > 8)
        {

            cout << "_________" <<endl;
        }

}

void swapAppNames(int appIndex1, int appIndex2, string appNames[])

{
    string temp = appNames[appIndex1];
    appNames[appIndex1] = appNames[appIndex2];
    appNames[appIndex2] = temp;

}

int pivot(int first, int last, string appNames[])

{
    int pivotIndex, mid = (first + last) / 2;
    swapAppNames(first, mid, appNames);
    pivotIndex = first;
    string pivotValue = appNames[first];
    for (int i = first + 1; i <= last; i++)
    {
        if (appNames[i] < pivotValue)
        {
            pivotIndex++;
            swapAppNames(pivotIndex, i, appNames);
        }

        swapAppNames(first, last, appNames);

        return pivotIndex;
    }

}

void quickSort(int first, int last, string appNames[])

{
    if (first < last)
    {
        int p = pivot( first, last, appNames);
        quickSort( first, p - 1, appNames);
        quickSort( p + 1, last, appNames);

    }

}

My goal is to sort the names in the string array "appNames". I added numbers to the names to show what order they SHOULD be in, but when I run the program, it doesn't seem to be sorting correctly at all. can anyone tell me where I'm going wrong?
I've been looking at this for a few days to no avail. 
Edit: Here's the solution. Big thanks to everyone who replied. Had to swap the position of a few variables and read up on the quicksort algorithm.
int pivot(int first, int last, string appNames[])

{
    int pivotIndex, mid = (first + last) / 2;
    swapAppNames(first, mid, appNames);
    pivotIndex = first;
    string pivotValue = appNames[first];
    for (int i = first + 1; i <= last; i++)
    {
        if (appNames[i] < pivotValue)
        {
            pivotIndex++;
            swapAppNames(pivotIndex, i, appNames);
        }

    }

    swapAppNames(pivotIndex, first, appNames);

        return pivotIndex;

}

A:

Your code, as you posted it, is still not correct. Here is a working version. I made a couple of changes.
I removed the mid heuristic from your pivot function. It is noise unless your assignment explicitly asked you to consider worst case scenarios. And if it did, then there are better heuristics to use. I also changed the way swapping works to a less efficient, but hopefully more intuitive version.
The other change was to the meaning of last as it was used in your quickSort and pivot interfaces. It is better if last means "one past the end". If last is actually the last item then you have no way to represent an empty list. In your notation (0,0) has length 1, (0,1) has length 2, etc. and the length is calculated as (last - first) + 1. If last is "one past the end", then the empty list is (0,0), (0,1) has length 1, etc. and the length is simply (last - first). If you carry on with C++ you will see that this is the way the STL works, so it is useful to learn it now.
#include <iostream>
#include <string>

using namespace std;

//Iterates over the string array appNames displaying each application
//name in a separate line. There are appCount elements in the array
void displayAllApplicationNames(string appNames[], int appCount);

//Swaps strings in string array appNames between appIndex1 and appIndex2
void swapAppNames(int appIndex1, int appIndex2, string appNames[]);

//Splits string array appNames around a pivot index p (the pivot).
//Elements below index p are less than elements above index p.
//The function returns the pivot p
int pivot(int first, int last, string appNames[]);

//Implements the QuickSort algorithm to sort string array
//appNames between indices first and last
void quickSort(int first, int last, string appNames[]);

int main() {
  string appNames[] = {
    "4) Pages", "2) Keynote", "3) Numbers",
    "8) Word", "5) PowerPoint", "1) Excel",
    "0) Documents", "6) Presentation", "7) Sheets" };
  displayAllApplicationNames(appNames, 9);
  swapAppNames(3, 6, appNames);
  displayAllApplicationNames(appNames, 9);
  quickSort(0, 9, appNames);
  displayAllApplicationNames(appNames, 9);
  return 0; }

void displayAllApplicationNames(string appNames[], int appCount) {
  for (int i = 0; i < appCount; ++i) {
    cout << "[" << i << "]\t" << appNames[i] << endl; }

  cout << "_________" << endl; }

void swapAppNames(int appIndex1, int appIndex2, string appNames[]) {
  string temp = appNames[appIndex1];
  appNames[appIndex1] = appNames[appIndex2];
  appNames[appIndex2] = temp; }

int pivot(int p, int n, string a[]) {
  for (int i = p + 1; i < n; ++i) {
    if (a[i] < a[p]) {
      swapAppNames(i, p + 1, a);
      swapAppNames(p, p + 1, a);
      ++p; } }

  return p; }

void quickSort(int first, int last, string a[]) {
  if (first < last) {
    int p = pivot(first, last, a);
    quickSort(first, p, a);
    quickSort(p + 1, last, a); } }

