Hmmm...I must have missed the first one.
Another problem that i'm running in to
#include <conio.h> //get rid of this
#include <stdlib.h> //get rid of this
and change this:
3) Don't use eof() as the means to terminate reading from the file. That can cause problems with infinite loops; it is not as straightforward as it appears. Instead, to properly terminate loops that read from files, you should use your read statement as the while loop conditional, e.g.:
while( in_file>>structure[i].title>>structure[i].author>>structure[i].pages )
Huh? open() fails if it can't find the file. Where is the program creating a file?
Another problem that i'm running in to is that everytime i run the program, it creates the file, i don't want this to happen.