Ok, clearly this is new to you. That's not a problem.
First, since you've declared doubles already for width, height and length, you should declare "feet" (which I assume is cubic feet) as a double, not an integer. Initialize it to 0.0 with
double feet = 0.0;
Don't bother with the calculation you have in that line where you declare feet, they haven't been supplied by the user yet.
Next, things otherwise look ok for asking for the item. However, it is way too early to use feet or calculate currentCost. You must ask for the width, height and length first.
Here's where you need to review what cin does. Let's say someone enters:
A 4 3.5 4.5 6.5
Which would be letter a, 4 items, 3.5 by 4.5 by 6.5 feet (I assume the units are feet).
That seems uncomfortable as a user interface, doesn't it? It would be smoother to ask for each parameter and then take that input.
Besides, even with a string the space separates these from each other, so that item string is only going to have "A" in it from my sample input string.
So, if your first parameter is the letter, ask for a letter with something like
1 2
|
cout << "Enter letter: ";
cin >> letter;
|
In this case, letter may be a string.
Then, ask for quantity:
1 2 3
|
int numberOfItems{0};
cout << "Enter quantity: ";
cin >> numberOfItems;
|
It shouldn't be a string.
Do the same for the rest of the parameters, after which you'll be able to calculate feet AFTER these parameters have been requested.
Try that and post your efforts.