Так торопилась, что забыла один очень важный файл. Я смотрю на свою программу, и вижу, что что-то не то. После Файл book1.h идет
Файл book1.cpp
// book1.cpp: implementation of the book class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include
#include
#include "book1.h" //////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
book::book(char *t,char *a,char *e, int y,int p)
{
setTitle (t);
setAuthor (a);
setEdition (e);
setYearOfEdit (y);
setPage (p);
}
book::~book()
{
delete title;
delete author;
delete edition;
}
void book::setTitle (char *t)
{
title = new char[strlen(t)+1]; //videlenie pamyati tipa char
strcpy(title,t); //copir. znach. perem t
// po adresu title
}
void book::setAuthor (char *a)
{
author = new char[strlen(a)+1]; //videlenie pamyati tipa char
strcpy(author,a);
}
void book::setEdition (char *e)
{
edition = new char[strlen(e)+1]; //videlenie pamyati tipa char
strcpy(edition,e);
}
void book::setYearOfEdit (int y)
{
yearOfEdit = y;
}
void book::setPage (int p)
{
page=p;
}
void about(book* bk) //print content about book
// peredajotsya object bk klassa book
{
cout << "Title of book: " << bk->getTitle()< cout << "Author of book: " << bk->getAuthor()< cout << "Edition: " << bk->getEdition()< cout << "Year Of Edition of book: " << bk->getYearOfEdit()< cout << "Pages of book: " << bk->getPage()< }
--------------------------------------------------------------------------------------------------------