Hi,
i have a ques...
is it possible to implement a function, member function of Library, that gets a long id; and returns Student stud; that has the same id, using find_if() or find() ? (from list<Student> students;)
thnx man, it helped.
i have another brobelm while compiling the program.
i`m getting this error:
1>Library.obj : error LNK2019: unresolved external symbol "public: __thiscall StudentNotFound::StudentNotFound(void)" (??0StudentNotFound@@QAE@XZ) referenced in function "public: void __thiscall Library::clearFines(long)" (?clearFines@Library@@QAEXJ@Z)
#include <exception>
class DuplicateItemAdding: public exception {
long index;
public:
DuplicateItemAdding(long i): index(i){}
virtualconstchar* what() const {
return"library cannot add item with the same id twice";
}
long getIndex() const {
return index;
}
};
class DuplicateStudentAdding: public exception {
long index;
public:
DuplicateStudentAdding(long i): index(i){}
virtualconstchar* what() const {
return"library cannot add title with the same catalogid twice";
}
long getIndex() const {
return index;
}
};
class StudentNotFound: public exception {
public:
StudentNotFound();
virtualconstchar* what() const {
return"Student NOT exists";
}
};
class ItemNotFound: public exception {
public:
ItemNotFound();
virtualconstchar* what() const {
return"Item NOT exists";
}
};
class ItemAlreadyLoaned: public exception {
public:
ItemAlreadyLoaned();
virtualconstchar* what() const {
return"Item Already Borrowed";
}
};
class AlreadyBorrowedByStudent: public exception {
public:
AlreadyBorrowedByStudent();
virtualconstchar* what() const {
return"lready borrowed";
}
};
class NotBorrowedByStudent: public exception {
public:
NotBorrowedByStudent();
virtualconstchar* what() const {
return"Item is not borrowed by student";
}
};