Guest User

Untitled

a guest
Jan 18th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. using namespace std;
  2. struct library
  3. {
  4. string bookname;
  5. string author;
  6. int bookno;
  7. };
  8. int main()
  9. {
  10. library *lib=NULL;
  11. lib=malloc(sizeof(lib)*1);
  12. lib=(library*)realloc(lib,2);
  13. cout<<"Enter Book Name: "<<endl;
  14. getline(cin,lib[i]->bookname);
  15. }
Add Comment
Please, Sign In to add comment