I am working on a project where you have an array of structures to keep track of bank records, and you have to be able to do deposits, withdrawls, adding accounts, etc...
Everything was going smoothly until I got to the part where I am coding the withdrawl command. When I go to compile my program, I get the "passing argument 2 of 'strcmp' from incompatible pointer type.
Here's the part thats having the problem:
Code:
fgets(buffer, BUFLEN, file_in);
sscanf(buffer, "%d", &withdrawl);
for (i = 0; i < counter; i++)
{
if (strcmp(buffer, &accts[i].acctNbr) == 0)
accts[i].acctBal = accts[i].acctBal - withdrawl;
}
Any help on this would be great! Thanks!