[ create a new paste ] login | about

Link: http://codepad.org/AS4Y1ybv    [ raw code | output | fork ]

aisflat439 - C++, pasted on Mar 27:
#include "Book.h"
#include <string>

using namespace std;

Book::Book()
{
    _title = "default";
    _author = "defaultAuthor";
    _ISBN = 1234567890;
    _price = 20.99;
}

Book::Book(string title, string author/*, int ISBN/*, double price*/)
{
    _title = title;
    _author = author;
//    _ISBN = ISBN;
//    _price = price;
}

void Book::setISBN(int ISBN)
{
    _ISBN = ISBN;    
}

void Book::setPrice(double price)
{
    _price = price;
}

string Book::getTitle()
{
    return _title;
}

string Book::getAuthor()
{
    return _author;
}

int Book::getISBN()
{
    return _ISBN;
}

double Book::getPrice()
{
    return _price;
}

void Book::setTitle(string title)
{
     _title = title;
}

void Book::setAuthor(string author)
{
     _author = author;
}


Output:
1
2
3
4
Line 17: error: Book.h: No such file or directory
Line 50: error: "/*" within comment
Line 6: error: 'Book' has not been declared
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: