Help With Libary Data Base.
Code:
void add_a_book (BOOK book_array[])
{
int i=0;
while ( book_array[i].number != 0 && i < SIZE )
{
i++;
}
if ( i == SIZE )
{
printf("\nSorry, the database is full\n");
}
else
{
printf( "\f\nBook Number (1 to 3 digits, except 0) : " );
}
do
scanf( "%d",&book_array[i].number );
while (book_array[i].number <= 0 );
printf("\nBook Name (Maximum 30 characters) : " );
scanf("%s",&book_array[i].name );
fflush(stdin);
printf("\nBook Status 1=(Y)es or 2=(N)o : " );
scanf("%d",&book_array[i].status );
printf("\n\n%d\n\n", &book_array[i].status);
}
the status on this funcion is a int and can be either 1 or 0 but it will not store the correct value for me. any help would be greatly recieved.