Hi there!
I keep getting an error stating error: expected unqualified-id before 'bool' when I try to compile this file
#include "Data.h"
#include <iostream>
Data::Data()
{
}
Data::Data(char aLetter, int anOrder)
{
letter=aLetter;
order=anOrder;
}
Data::~Data()
{
}
ostream& operator<< (ostream& out,const Data& someData)
{
out << "(" << someData.order << ", " <<
someData.letter << ")";
return out;
}
Data::bool operator<(Data& someData)
{
return this->order<someData.order;
}
#ifndef Data_H_include
#define DATA_H_include
#include <iostream>
using namespace std;
class Data
{
private:
int order;
char letter;
public:
Data();
Data(char, int);
~Data();
bool operator<(const Data&) const;
friend ostream& operator<<(ostream&,const Data&);
};
#endif
I'm getting fairly frustrated as I am not sure what to put before bool. Can anyone help me?