This is part of a class method.
BookName and Author are the attribute of the class!
this is the class:
PHP Code:
class Book
{
public:
Book();
Book(string);
void setBookInfo(void);
friend void split(Book&, string, const char);
string BookName;
string Author;
int pages;
};
and this is setBookInfo declaration:
PHP Code:
void Book::setBookInfo()
{
cout << endl << "-------------------------------------------------------------------" << endl
<< "> Enter book title: ";
getline(cin, BookName);
cout << "> Enter author of book: ";
getline(cin, Author);
cout << "> Enter number of Book pages: ";
cin >> pages;
cout << "-------------------------------------------------------------------" << endl << endl;
}