Title says it all, basically I'm just trying to print the pointer *p to display all the values in that array.
#include <iostream>
#include <string>
//#include <stdlib>
using namespace std;
void extend(double *p, double *q, double *a, int c);
int main()
{
const int CONST = 10;
double price[CONST] = { 14.89, 13.21, 16.55, 18.62, 9.47, 6.58, 18.32, 12.15, 3.98 };
double quantity[CONST] = { 4, 8.5, 6, 7.35, 9, 15.3, 3, 5.4, 2.9, 4.8 };
double amount[CONST];
// double *p = &price[0];
extend(price, quantity, amount, CONST);
}
void extend(double *p, double *q, double *a, int c)
{
double p1 = *p++;
cout << p1;
for(int i = 1; i < 10; i++)
{
cout << p1[i];
}
}