I tried compiling this code but its giving me "passing argument 2 of ‘strcpy’ makes pointer from integer without a cast [-Wint-conversion]". Can someone tell me what i need to do.
struct Book
{
char title[MAX_TITLE_LENGTH+1];
char author[MAX_AUTHOR_LENGTH+1];
int year;
};
void menu_delete_book(void)
{
char temp[300];
int x,b;
int no_books;
fgets(temp,MAX_TITLE_LENGTH,stdin);
{
for(x = 0; x< no_books; x++)
{
if (strcmp (book_array[x].title, temp) == 0)
{
for(x=1; x < no_books -1; x++)
{
for(b = x + 1; b < no_books; b++)
{
strcpy(book_array[x].title, book_array[b].title);
strcpy(book_array[x].author, book_array[b].author);
strcpy(book_array[x].year, book_array[b].year);
}
}
}
}
}
no_books++;