#include <iostream>
#include<string>
using namespace std;
class Book
{
private:
string title;
double price;
public:
Book();
void setTitle(string s);
void setPrice(double p);
string getTitle() const;
{return title;}
error code C2059(syntax error: '{' ) and C2334(unexpected token preceding '{' skipping apparent function body occur
double getPrice() const;
{return price;}
error code C2059(syntax error: '{' ) and C2334(unexpected token preceding '{' skipping apparent function body occur
bool hasKeyword(string key);
};
Book::Book()
{
title="None";
price=0;
}
void Book :: setTitle(string s)
{
title=s;
}
void Book::setPrice(double p)
{
if(p>0)
{
price=p;
}
else
{
price=0;
}
}
what is wrong with my code?