E
Ernesto
Hi everybody:
I have the following typedefs:
typedef unsigned char UCHAR;
typedef unsigned char BYTE;
I am implementing a class String with the following operators overloaded:
String& operator+ (const UCHAR& myChar);
String& operator+ (const BYTE& myByte);
I want
String("HELLO") + (const UCHAR&) 'a' to return "HELLOa"
and
String("HELLO") + (const BYTE&) 12 to return "HELLO12"
but my compiler says: Redefinition of operator+ (const unsigned char&)
Is there a way to really create new types or workaround with my issue?
Thanks in advance
Ernesto
I have the following typedefs:
typedef unsigned char UCHAR;
typedef unsigned char BYTE;
I am implementing a class String with the following operators overloaded:
String& operator+ (const UCHAR& myChar);
String& operator+ (const BYTE& myByte);
I want
String("HELLO") + (const UCHAR&) 'a' to return "HELLOa"
and
String("HELLO") + (const BYTE&) 12 to return "HELLO12"
but my compiler says: Redefinition of operator+ (const unsigned char&)
Is there a way to really create new types or workaround with my issue?
Thanks in advance
Ernesto