#include <iostream>
using namespace std;
void input(partsType inventory[100]&)
{}
int main()
{
struct partsType
{
string partName;
int partNum;
double price;
int quantitiesInStock;
};
partsType inventory[100];
}
I am trying to use a struct variable as a formal parameter. Later I will pass the variable by reference.
Currently, I am getting the error
declaration is incompatible, and `partsType` is undefined.