Here are my instructions:
This assignment uses pthreads to perform parallel processing – allowing you to speed up your sort program substantially. You should use 10 threads in your program. Your program will read in 1 million unsorted numbers from numbers.dat into an array. Then you will logically split the array into 10 sections – each section will have 100,000 numbers. You will call pthread_create( ) 10 times and pass each section of the array to the thread to sort using the sort algorithm you used in the previous assignment. Once all the threads have returned, you will merge 2 adjacent sections into a sorted super section, and continue to do that until all the smaller sorted sections are in one large sorted section – which will be the entire array of 1 million numbers. Then print the array to a file. Then you will call sort -c to verify the output file is sorted.

Now please check my code below for errors according to those instructions:
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <thread>
#include <iostream>
#include <unistd.h>
#include <fstream>
using namespace std;

unsigned int NUM_THREADS = 8;
unsigned int NUM_SIZE = 1000000;

struct printStruct{
	int *pstart; // pointer to the starting array element
	int size; 
}

void *bubblesort(void *ptr){
	printStruct *arg = (printStruct *) ptr;
	int i, j;
	for(int i = 0; i < (elements - 1); i++)
	{
		for (int j = 0; j < (elements - 1 - i); j++)
		{
			if (sortArray[j] > sortArray[j+1])
			{
				temp = sortArray[j];
				sortArray[j] = sortArray[j+1];
				sortArray[j+1] = temp;
			}
		}
	}
	return NULL;
}

void merge(int* left, int* right, int leftSize, int rightSize){
	int leftIndex = 0, rightIndex = 0, mergedIndex = 0;
	int* temp = new int[leftSize + rightSize];
	while(leftIndex < leftSize && rightIndex < rightSize){
		/* this part is sus
		temp[merged++] = left[left] < right[right]
		*/
	}
	while(leftIndex < leftSize){
		temp[mergedIndex++] = left[leftIndex++];
		}
	while(rightIndex < rightSize){
		temp[mergedIndex++] = right[rightIndex++]
	}
	delete[] temp;
}

int main(int argc, char*argv[])
{
	ifstream numFile(argv[1]);
	int elements = 0;
	int sortArray[1000000];
	int size; // size of the array = size of the elements
	int temp;

	while (numFile >> size)
	{
		sortArray[elements] = size;
		elements++;
	}

	numFile.close();
	
	printStruct s1;
	s1.pstart = 
	s1.size = 100000;
	
	printStruct s2;
	s2.pstart = 
	s2.size = 100000;
	
	printStruct s3;
	s3.pstart = 
	s3.size = 100000;
	
	printStruct s4;
	s4.pstart = 
	s4.size = 100000;
	
	printStruct s5;
	s5.pstart = 
	s5.size = 100000;
	
	printStruct s6;
	s6.pstart = 
	s6.size = 100000;
	
	printStruct s7;
	s7.pstart = 
	s7.size = 100000;
	
	printStruct s8;
	s8.pstart = 
	s8.size = 100000;
	
	printStruct s9;
	s9.pstart = 
	s9.size = 100000;
	
	printStruct s10;
	s10.pstart = 
	s10.size = 100000;
	
	pthread_t thread0, thread1, thread2, thread3, thread4, thread5, thread6, thread7, thread8, thread9;
	int iret0, iret1, iret2, iret3, iret4, iret5, iret6, iret7, iret8, iret9;
	
	iret0 = pthread_create( &thread0, NULL, bubblesort, (void*) &s1);
	iret1 = pthread_create( &thread1, NULL, bubblesort, (void*) &s2);
	iret2 = pthread_create( &thread2, NULL, bubblesort, (void*) &s3);
	iret3 = pthread_create( &thread3, NULL, bubblesort, (void*) &s4);
	iret4 = pthread_create( &thread0, NULL, bubblesort, (void*) &s5);
	iret5 = pthread_create( &thread1, NULL, bubblesort, (void*) &s6);
	iret6 = pthread_create( &thread2, NULL, bubblesort, (void*) &s7);
	iret7 = pthread_create( &thread3, NULL, bubblesort, (void*) &s8);
	iret8 = pthread_create( &thread0, NULL, bubblesort, (void*) &s9);
	iret9 = pthread_create( &thread1, NULL, bubblesort, (void*) &s10);

	pthread_join( thread0, NULL);
	pthread_join( thread1, NULL);
	pthread_join( thread2, NULL);
	pthread_join( thread3, NULL);
	pthread_join( thread4, NULL);
	pthread_join( thread5, NULL);
	pthread_join( thread6, NULL);
	pthread_join( thread7, NULL);
	pthread_join( thread8, NULL);
	pthread_join( thread9, NULL);

	ofstream outFile(argv[2]);

	for(int i = 0; i < elements; i++)
	{
		outFile << sortArray[i] << endl;
	}

	outFile.close();

	return 0;
}