G
Gernot Frisch
DGStr* pS = new DGStr[3];
// gives error:
error C2660: 'operator new': function does not accept 3 arguments
see 'void GLBASIC:IM<GLBASIC:GStr>
(GLBASIC:GArray<T>&,DGInt,DGInt,DGInt,DGInt,DGInt,DGInt,DGInt,DGInt)'
with
[
T=GLBASIC:GStr
]
// Here's my DGStr declaration
class DGStr
{
public:
DGStr();
DGStr(CGStr a);
DGStr(const DGStr& a);
DGStr(const char* c);
DGStr(int a);
DGStr(float a);
DGStr(double a);
~DGStr();
const char* c_str();
DGStr& operator=(const DGStr& a);
DGStr& operator=(int a);
DGStr& operator=(float a);
DGStr& operator=(double a);
DGStr& operator=(const char* a);
operator DGInt()const;
DGStr& operator+=(const char* a);
// DGStr operator +-*/ (const DGStr& a);
#define MK_OPERATOR_CL(zz) \
DGStr& operator zz(const DGStr& a); \
DGStr& operator zz(int a); \
DGStr& operator zz(float a); \
DGStr& operator zz(double a);
MK_OPERATOR_CL(+=)
MK_OPERATOR_CL(-=)
MK_OPERATOR_CL(*=)
MK_OPERATOR_CL(/=)
MK_OPERATOR_CL(^=)
#undef MK_OPERATOR_CL
};
what can it be!?
// gives error:
error C2660: 'operator new': function does not accept 3 arguments
see 'void GLBASIC:IM<GLBASIC:GStr>
(GLBASIC:GArray<T>&,DGInt,DGInt,DGInt,DGInt,DGInt,DGInt,DGInt,DGInt)'
with
[
T=GLBASIC:GStr
]
// Here's my DGStr declaration
class DGStr
{
public:
DGStr();
DGStr(CGStr a);
DGStr(const DGStr& a);
DGStr(const char* c);
DGStr(int a);
DGStr(float a);
DGStr(double a);
~DGStr();
const char* c_str();
DGStr& operator=(const DGStr& a);
DGStr& operator=(int a);
DGStr& operator=(float a);
DGStr& operator=(double a);
DGStr& operator=(const char* a);
operator DGInt()const;
DGStr& operator+=(const char* a);
// DGStr operator +-*/ (const DGStr& a);
#define MK_OPERATOR_CL(zz) \
DGStr& operator zz(const DGStr& a); \
DGStr& operator zz(int a); \
DGStr& operator zz(float a); \
DGStr& operator zz(double a);
MK_OPERATOR_CL(+=)
MK_OPERATOR_CL(-=)
MK_OPERATOR_CL(*=)
MK_OPERATOR_CL(/=)
MK_OPERATOR_CL(^=)
#undef MK_OPERATOR_CL
};
what can it be!?