Your function deleteEvenNumber()
requires an int []
(i.e. int
array), however you passed it an int
to it.
manipulateArrays.deleteEvenNumber(mainArray[length]);
^^^^^^^^^^^^^^^^^
|
this is an 'int', not an 'int []'
To also pass the length
to the function, you may want to change your function to
int deleteEvenNumber(int getArray[], int length)
And then call it like:
manipulateArrays.deleteEvenNumber(mainArray, length);
Alternatively, you can use vector<int> mainArray
instead, and then you can easily get its length by mainArray.size()
.