void AddInput()
{
char tempTitle[40];
char tempAuthor[20];
char tempCategory;
int sizeInput;
Entry e;
cout << "Enter title: ";
cin.getline(tempTitle, 80);
cout << "Enter author: ";
cin.getline(tempAuthor, 80);
cout << "Enter category: ";
cin.ignore();
cin.get(tempCategory);
cout << "Enter the size in kb: ";
cin >> sizeInput;
//assign new title to a new entry
tempTitle = e.GetTitle(); //error: Array type char[40] not assignable
//assign a new author to a new entry
tempAuthor = e.GetAuthor(); //error: Array type char[20] not assignable
tempCategory = e.GetCategory();
sizeInput = e.GetSize();
}
constchar* Entry::GetTitle() const
/* returns the title stored */
{
return title;
}
constchar* Entry::GetAuthor() const
{
return author;
}
I guess my main problem is how to add the new entry without having access to the private members of class Entry which are the title, author, category , and size