hi i have a project and mainly what i need to do is i have a (input)txt file with a bunch of random numbers unsorted and then i will store those numbers into an array, sort them and then put the sorted numbers into a different (output)txt file. i kinda understand for the most part but i know im missing stuff i know i need to actually insert the numbers into the (output)txt file and im kinda just stuck on how to go about it. any input would be such a big help and much appriciated. this is my code so far...
#include <iostream>
#include <fstream>
using namespace std;
void ReadArray(ifstream &inputFile, int array[], int &size);
void SortArray(int array[], int size);
void swap(int &x, int &y);
void WriteArray(ofstream &outputfile, int array[], int size);
int main()
{
const int MAXSIZE = 1000;
int size=0;
int array[MAXSIZE];
int sorted[MAXSIZE];
//decaring the input file stream
ifstream inputFile;
//declaring the output file stream
ofstream outputFile;