Hi,
Given the following can anyone complete it so that I can add books to an inventory. I am complete beginner and lost on where to go with it. From there I need to develop it to find, and modify books in the inventory. If I can just get the add part going I think I can do the rest. I am programming in C and using Unix to compile.
Thanks for any help!
#include <stdio.h>
FILE* datafile = fopen("books.dat", "w"
if (datafile == NULL) {
/* ... could not create file ... */
}
typedef struct Book_ {
char title[40];
char author[40];
char publisher[50];
float cost;
int pages;
} Book;
Given the following can anyone complete it so that I can add books to an inventory. I am complete beginner and lost on where to go with it. From there I need to develop it to find, and modify books in the inventory. If I can just get the add part going I think I can do the rest. I am programming in C and using Unix to compile.
Thanks for any help!
#include <stdio.h>
FILE* datafile = fopen("books.dat", "w"
if (datafile == NULL) {
/* ... could not create file ... */
}
typedef struct Book_ {
char title[40];
char author[40];
char publisher[50];
float cost;
int pages;
} Book;