|  | 
 
 发表于 2019-1-5 12:17:38
|
显示全部楼层 
| I found 4 problems when watching your code P 1. Undefined reference to `main'
 A 1. Your entry point typed in int mian(void), instead of int main(void)
 
 P2. struct Book{} declared under function()
 A 2. When declared' function try to find struct Book that does not declared before, error pops up.
 
 P 3. In printfLibrary() section, book address was empty
 A 3. You have to set book = library;
 
 P 4. Write argument name when declare function e.g void addBook(struct Book **xyz);
 A 4. When you use the function to print your struct, it may not show the input. whould be write as void addBook(struct Book **);
 
 Code should be like this:
 
 | 
 
output   |