Classes & Objects
Lesson 27Author : 🦒
Last Updated : November, 2017
int main(){
Book book1;
book1.title = "Harry Potter";
book1.author = "JK Rowling";
book1.numPages = 500;
cout << book1.title << endl;
Book book2;
book2.title = "Lord of the Rings";
book2.author = "JRR Tolkien";
book2.numPages = 300;
cout << book2.title << endl;
return 0;
}