prog.cpp: In function ‘void insertBooks(Book*, int)’:
prog.cpp:16:41: error: request for member ‘title’ in ‘list’, which is of pointer type ‘Book*’ (maybe you meant to use ‘->’ ?)
printf("title? "); scanf_s("%s", list.title);
^~~~~
prog.cpp:16:46: error: ‘scanf_s’ was not declared in this scope
printf("title? "); scanf_s("%s", list.title);
^
prog.cpp:17:42: error: request for member ‘author’ in ‘list’, which is of pointer type ‘Book*’ (maybe you meant to use ‘->’ ?)
printf("author? "); scanf_s("%s", list.author);
^~~~~~
prog.cpp:18:42: error: request for member ‘pages’ in ‘list’, which is of pointer type ‘Book*’ (maybe you meant to use ‘->’ ?)
printf("pages? "); scanf_s("%d", &list.pages);
^~~~~
prog.cpp: In function ‘void printBooks(Book*, int)’:
prog.cpp:27:29: error: request for member ‘title’ in ‘list’, which is of pointer type ‘Book*’ (maybe you meant to use ‘->’ ?)
printf("title: %s ", list.title);
^~~~~
prog.cpp:28:33: error: request for member ‘author’ in ‘list’, which is of pointer type ‘Book*’ (maybe you meant to use ‘->’ ?)
printf("author: %s ", list.author);
^~~~~~
prog.cpp:29:31: error: request for member ‘pages’ in ‘list’, which is of pointer type ‘Book*’ (maybe you meant to use ‘->’ ?)
printf("pages: %d \n", list.pages);
^~~~~
prog.cpp: In function ‘void saveAsFile(Book*, int)’:
prog.cpp:38:32: error: request for member ‘title’ in ‘list’, which is of pointer type ‘Book*’ (maybe you meant to use ‘->’ ?)
fprintf(fp, "%s %s %d", list.title, list.author, list.pages);
^~~~~
prog.cpp:38:44: error: request for member ‘author’ in ‘list’, which is of pointer type ‘Book*’ (maybe you meant to use ‘->’ ?)
fprintf(fp, "%s %s %d", list.title, list.author, list.pages);
^~~~~~
prog.cpp:38:57: error: request for member ‘pages’ in ‘list’, which is of pointer type ‘Book*’ (maybe you meant to use ‘->’ ?)
fprintf(fp, "%s %s %d", list.title, list.author, list.pages);
^~~~~