Code:
struct inventory invDB[INVMAX];
struct transaction traDB[TRAMAX];
void findAmt(struct inventory invDB, int *invDB_amt, struct transaction traDB, int *traDB_amt);
main()
{
findAmt(invDB, &invDB_amt, traDB, &traDB_amt);
}
You have no such thing as "invDB_amt" and "traDB_amt". There are no such variables in your program. There are however, these variables in the prototype of the function. That's probably where your confusion is.
Code:
void findAmt(struct inventory invDB, *invDB_amt, struct transaction traDB, *traDB_amt)
You can't do that either. You have to have the whole thing in there:
Code:
void findAmt(struct inventory invDB, struct inventory *invDB_amt, struct transaction traDB, struct inventory *traDB_amt)
Of course, in your prototype, you have those two as int. So, you'll need to decide what it is you want. Next, since those two particular variables still don't exist, you'd have to create int variables to pass to them.
However, since I assume you're really trying to pass your arrays over...
Code:
findAmnt( invDB[ONE_INSTANCE], invDB, traDB[ONE_INSTANCE], traDB );
This would be passing 1 single instance, followed by passing the array, followed by one instance, followed by the whole array.
However, since you're actually using global variables, there's no real point to passing anything anyway...
Quzah.