please consider following code
#include
using namespace std;
class Digit
{
private:
int m_digit;
public:
Digit(int ndigit=0){
The operator, just as any function, is identified by the signature. The return type and modifiers before the function/operator name is not included in this. Your operators names are here
operator++()
operator++(int)
This is the only way the compiler distinguishes between the two. As for the Digit& and Digit return values; They are needed because of the way ++x, and x++ are supposed to operate.