In C++ is there a way to define a class to be "comparable"? What Im trying to do is write a class that holds a string and a vector of numbers. If an object of this type is compared to another object I want the string that each object contains to be the "thing" thats compared. The header of my class so far is:
#ifndef index_h
#define index_h
#include <String>
using namespace std;
class index{
public:
index(string word);
void putpage(int number);
bool haspage(int number);
};
#endif
Any input or help is appreciated, I'm new to c++