Ok I'm new here and I thought I can get some help with a program I'm working on.
First let me give you an idea of what the program is about. I have to write a program that calculates shipping charges for orders. Using two dimensional array where all orders are charged 20.00 plus an additional rate based on quantity and region. Here's my code:
#define HEIGHT 6
#define WIDTH 6
using namespace std;
p2DArray = new double*[HEIGHT];
for (int i = 0; i < HEIGHT; ++i)
p2DArray[i] = new double[WIDTH];
totalShip = basicShip + addRate;
cout<<"The basic shipping rate = "<<basicShip<<" . "<<endl;
cout<<"Shipping "<<quantity<<" items to shipping-destination region "<<region<<" the additional rate is "<<addRate<<" . "<<endl;
cout<<"The total shipping rate = "<<totalShip<<" . "<<endl;
Now it builds/compiles successfully but when I run the program and insert the values. I get 11.50 for everything. When I enter 1 quantity and region 1 it should be 20 + 1. But it is not, what am I doing wrong? I need a quick reply, please help.