Can't figure this one out. Please go easy on me, im new to this. Keep getting error and don't know how to fix
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.
Now take above struct definition above and:
Write a C++ code to initialize each component of inventory as follows: part name to null string, partNum to -1, price to 0.0 and quantities in quantitiesInStock to 0.
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.
Note suggest testing your solution and submit outcome.
Write a C++ code to initialize each component of inventory as follows: part name to null string, partNum to -1, price to 0.0 and quantities in quantitiesInStock to 0.
Why aren't you using a constructor to initialize those variables to their default values?