i Am beginner to c++, so bear with me
i can seem to fix these errors
error c2109
subscript requires a pointer or arrays
//Stephen Igbinedion
//CMPS
//Due Date; Dec 4th 2009
//Programming Assignments 6 (Final assignment for CMPS 1043)
//This Program orders a set of integers.
#include <iomanip>
#include <iostream>
#include <fstream>
#include <cctype>
#include <stdlib.h>
typedef int arrays[];
int arraysnumber;
void function1(arrays, int x);
void function2(arrays, arrays, arrays, int y);
void function3(arrays, int z);
using namespace std;
ifstream input;
ofstream output;
int main()
{
int arraysize;
arrays unorder = {0,0,0,0,0};
arrays index = {0,0,0,0,0};
arrays order = {0,0,0,0,0};
input.open("decode.txt");
output.open("output.txt");
output<<"ARRAYS (PROGRAMMING 6)\n\n";
while(!input.eof())
{
input>>arraysize;
function1(unorder, arraysize);
function1 (index, arraysize);
function2 (unorder, index, order, arraysize);
output<<endl<<"unorder: ";
function3(unorder, arraysize);
output<<endl<<"index: ";
function3(index, arraysize);
output<<endl<<"order: ";
function3(order, arraysize);
output<<endl<<endl;
}
output<<endl<<"----------NO MORE DATA--------------";
return 0;
}
void function1(int arraysnumber,int arraysize)
{
for (int j = 0; j < arraysize; j++)
{
input>>arraysnumber[arraysize];
}
}
void function2(arrays unorder, arrays index, arrays order, int arraysize)
{
for (int j = 0; j<arraysize; j++)
{
order[index[j]]=unorder[j];
}
}
void function3(int arraysnumber, int arraysize)
{
for( int j = 0; j < arraysize; j++)
output<<arraysnumber[arraysize]<<endl;
}