You made a lot of mistakes. Study the following code to see your mistakes.
#include <iostream>
using namespace std;
int addf(int arr[], int size)
{
int sum=0;
cout<<"How many numbers do you want to add?"<<endl;
cin >> size ;
for(int x=0;x<size;x++)
{
cout<<"Please enter a number that you wish to have in your sum"<<endl;
cin >> arr[x] ;
sum+=arr[x] ;
}
return sum ;
}
int main(){
int A[5];
int r = addf(A, sizeof(A));
cout<<"Sum is "<<r;
}