Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using namespace std;
- struct library
- {
- string bookname;
- string author;
- int bookno;
- };
- int main()
- {
- library *lib=NULL;
- lib=malloc(sizeof(lib)*1);
- lib=(library*)realloc(lib,2);
- cout<<"Enter Book Name: "<<endl;
- getline(cin,lib[i]->bookname);
- }
Add Comment
Please, Sign In to add comment