Assume the definition of Exercise 11.
a. Write a C++ code to initialize each component of inventory as follows: partName to null string, partNum to -1, price to 0.0, and quantitiesInStock to 0.
b. Write a C++ code that uses a loop to output the data stored in inventory. Assume that the variable length indicates the number of elements in inventory.
Reference:
Assume that you have the following definition of a struct:
struct partsType
{ string partName;
int partNum;
double price;
int quantitiesInStock;
};
Declare an array, inventory, of 100 components of type partsType.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.