S
sdlt85
This is part of my program but for some reason it is not taken the
value of c in the array P[n]. Can some one help me please.
int main()
{
int x, c, p;
cout<<"Enter the value for x: ";
cin>>x;
cout<<"How many coefficients? ";
cin>>c;
const int n = c-1;
int P[n]; // here are the errors: expected constant
expression,
//cannot allocate an
array of constant size 0, 'P': unknown size.
}
Thanks
value of c in the array P[n]. Can some one help me please.
int main()
{
int x, c, p;
cout<<"Enter the value for x: ";
cin>>x;
cout<<"How many coefficients? ";
cin>>c;
const int n = c-1;
int P[n]; // here are the errors: expected constant
expression,
//cannot allocate an
array of constant size 0, 'P': unknown size.
}
Thanks