Created
June 12, 2016 18:25
-
-
Save Soulstorm50/ecab0939fc29c1928f3ed67b4b894196 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
class Book //класс книга | |
{ | |
public: // модификатор доступа | |
char* name; // модель планшета | |
char* colour; // цвет | |
int year; // год издания | |
int pages; // | |
// методы: | |
void Read() //метод Read. | |
{ | |
cout <<"You are reading "<<name << " now.\n"; | |
} | |
void Leafe() //метод Leafe | |
{ | |
cout << "You are leafing all " << pages << " pages now.\n"; | |
} | |
}; | |
void main() | |
{ | |
Book b; | |
b.name = "C++ S.Prata"; | |
b.colour = "White"; | |
b.year = 2016; | |
b.pages = 1244; | |
b.Read(); | |
b.Leafe(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment