i have errors and i dont know y im gettin them here is the code. a majority of them are undeclaired idetifyers but they are function calls?!?!
#include <iostream>
#include <iomanip>
using namespace std;
class Array
{
public:
Array();
Array(const Array& copyFrom);
~Array() { };
void append(int arrayA[]);
void chop(int arrayA[]);
void print(int arrayA[], int arrayB[], int arrayC []);
void values(int arrayA[], int arrayB[], int *ptr);
void is_equal(int arrayA[], int arrayB[], int arrayC[]);
private:
int add,
subtract;
};
void main()
{
int arrayA[5] = {1,2,3,4,5},
arrayB[7] = {1,2,3,4,5,0,0},
arrayC[5] = {1,2,3,4,5};
int copyFrom;
Array();
Array(Array& copyFrom);
values(arrayA[5]);
print(arrayA[5], arrayB[7], arrayC[5]);
append(arrayA[5]);
print(arrayA[5], arrayB[7], arrayC [5]);
chop(arrayA[5]);
print(arrayA[5], arrayB[7], arrayC[5]);
cout << "Check to see if any array's are equal" << endl;
is_equal(arrayA[5], arrayB[7], arrayC[5]);
}//main
Array::Array()
{
int *ptr = 0;
}
Array::Array(const Array& copyFrom)
{
int arrayA[5] = copyFrom.arrayA[5];
}// end copy
void Array::append(int arrayA[])
{
cout<<"Enter the number you are inserting\n\n";
cin>> add;
cout << "We will insert " << add << " into Array A\n" << endl;
arrayA[5-1] = add;
}//end append
void Array::chop(int arrayA[])
{
cout << "Now we will delete that value from the Array" << endl;
}
void Array::values(int arrayA[], int arrayB[], int *ptr)
{
*this = arrayA[5];
*ptr = arrayB[7];
}// end values
void Array::print(int arrayA[], int arrayB[], int arrayC [])
{
cout << "Array A is: " << endl;
for(int i = 0; i < 5; i++)
cout << arrayA[i] << " ";
cout << "\n\n";
cout << "Array B is: " << endl;
for(int j = 0; j < 7; j++)
cout << arrayB[j] << " ";
cout << "\n\n";
cout << "Array C is: " << endl;
for(int k = 0; k < 5; k++)
cout << arrayC[k] << " ";
cout << "\n\n";
}//print
void Array::is_equal(int arrayA[], int arrayB[], int arrayC[])
{
for(int i = 0; i < 5; i++)
cout << arrayA[i] << " ";
cout << endl;
for(int j = 0; j < 7; j++)
cout << arrayB[j] << " ";
cout << endl;
if(arrayA[i] == arrayB[j])
cout << "True" << endl;
else
cout << "False" << endl;
for (i = 0; i < 5; i++)
cout << arrayA[i] << " ";
cout << endl;
for( j = 0; j < 5; j++)
cout << arrayC[j] << " ";
cout << endl;
if(arrayA[i] == arrayC[j])
cout << "True" << endl;
else
cout << "False" << endl;
}
Array::~Array()
{
delete arrayA;
}//destructor