#include "library.h"
#include <iostream>
#include <string>
#include <cassert>
usingnamespace std;
Library::Library() //Creates an empty library without books and without authors.
{
char *p;
p = newchar[library]
}
Library::~Library() //Destructor
{
delete [] p;
p = NULL;
}
void Library::add(string title, string authors[], int nAuthors)// Add a book
{
}
void Library::print() const // Print the list of all books ordered by book title.
{
for(int i = 0; i<length; i++)
cout << p[i] << " ";
}
void Library::printByAuthor(string author) const //Print the list of books of a given author, ordered by book title.
{
}
i wanted to know if you can see any problems with my definitions so far..thanks
Why not simply use one of the STL container classes? - while it is (to a certain extent) useful to write a linked list from scratch as part of the learning process so that you understand the principals behind them, using the STL version lets you concentrate on the rest of your program.