#include <iostream>
#include <new>
using namespace std;
void business (int num[], int num2[]);
int main ( )
{
int i,j,k;
int * p, *pt;
cout << "How many numbers would you like add? ";
cin >> i;
cout << "What would you like to add?";
cin >> j;
cout << "+";
cin >> k;
business (i,j,k);
delete[] p;
return 0;
}
void business (int )
{
int n;
for (n=0; n<i; n++)
{
cout << "Enter number: ";
cin >> p[n];
}
cout << "You have entered: ";
for (n=0; n<i; n++)
cout << p[n] << ", ";
cout << p[n] + p[n];
}
So i want to make the function business to obtain the numbers and add them to each other. What am I doing wrong here?