Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //main
- #include<iostream>
- #include<string>
- #include"Book.h"
- using namespace std;
- int main() {
- setlocale(LC_ALL, "Russian");
- Book b1;
- cout << "автор" " " << b1.author << endl;
- cout <<"название"" " << b1.title << endl;
- cout << "содержание"" "<< b1.soderzanie << endl;
- return 0;
- }
- //class book
- #pragma once
- #include<iostream>
- #include<string>
- using namespace std;
- class Book
- {
- public:
- string title = "";
- string author = "";
- string soderzanie = "";
- Book();
- };
- //контсруктор класса book
- #include "Book.h"
- Book::Book()
- {
- this->author = "Roman";
- this->title = "dark side of coding";
- this->soderzanie = "1.beginning,2.middle,3.end";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement