necessary help

please help me fixing errors


#include<iostream>
include<string>
using namespace std;
#ifndef MACHINE_H
#define MACHINE_H
class Machine{
friend ostream&operator<<(ostream&,const Machine&);
friend istream &operator>>(istream&, Machine&);

private:string type;
double price;
int model;
string detail[3];
bool preowned;

public:
~Machine(){
cout<<"BYE\n";}

Machine(Machine& a){// copy constructor
type=a.type;
price=a.price;
preowned=a.preowned;
detail[3]=a.detail[3];
model=a.model;
}

Machine(int a,string n,int c){ //default constructor
detail[3]=" ";
preowned=0;
model=c;
price=a;
type=n;
setType();
setPrice();
setModel();
setPreowned();
setDetail();
}



void setType(){
cout<<"Enter the type of the machine\n";
string a;
cin>>a;
type=a;}

void setPrice(){
cout<<"Enter the machine price\n ";
double a;
cin>>a;
price =a;}

void setModel(){
cout<<"enter the machine model year:\n";
int s;
cin>>s;
model=s;}

void setPreowned(){
cout<<"Is this machine preowned?? if yes enter 1 else enter 0 \n";
bool d;
cin>>d;
preowned=d;
if(d)
cout<<"used machine\n";
else
cout<<"new machine\n";}

void setDetail(){
string n[3];
cout<<"enter the origin";
cin>>n[0];
setDetailS(n[0],0);
cout<<"enter the brand name";
cin>>n[1];
setDetailS(n[1],1);
cout<<"enter the Owner name";
cin>>n[2];
setDetailS(n[2],2);
}


void setDetailS(string a ,int c){
detail[c]=a;}

string getType()const{
return type;}

double getPrice()const{
return price;}

bool getPreowned()const{
return preowned;}

int getModel()const{
return model;}

string getDetails(int a){
return detail[a];}

// new needed members

operator char(){ // conversion operator
char a;
a=type[0];
return a;}


Machine operator=(string n){ // assignment operator
type=n;
return *this;}

Machine& Machine::operator/=(double a){ // modifing operator
price=price/a;
return *this;}

Machine& operator--(){
model-=1;
return *this;}

Machine operator--(int){
Machine temp(*this);
model-=1;
return temp;
}

string operator [](char m){
if(m=='t')
return type;

}

string operator [](double n){
if(n==0)
return detail[0];
if(n==1)
return detail[1];
if(n==2)
return detail[2];

}

bool operator !=(Machine &d){
if(type!=d.type)
return true;
if(price!=d.price)
return true;
if(preowned!=d.preowned)
return true;
if(model!=d.model)
return true;
else
return false;
}

bool operator >=(Machine & d){
if (price>=d.price)
return 1;
else
return 0;
}};


ostream& operator<<(ostream& cout,const Machine& a){
cout<<"the Type: "<<a.type<<endl;
cout<<"the price : "<<a.price<<endl;
cout<<"Model Year :"<<a.model<<endl;
cout<<"Origin :"<<a.detail[0]<<"\nbrand name :"<<a.detail[1]<<" \nOwner name : "<<a.detail[2]<<endl;
if(a.preowned==1)
cout<<"this machine is used \n";
else
cout<<"this machine is new\n";
return cout;}

istream &operator>>(istream& cin, Machine& a){
cin>>a.type;
cin>>a.price;
cin>>a.model;
cin>>a.detail[0]>>a.detail[1]>>a.detail[2];
cin>>a.preowned;
return cin;}


int main(){

Machine s;


return 0;}
missing "#" in line 2

for the rest edit your post and wrap it in codetags "<>"
Topic archived. No new replies allowed.