On 5 Jul 2005 10:37:46 -0700,
asetofsymbols@yahoo.com wrote:
yes i have a troll hart
it seems i like the c++ classes but the remain of the language is in
the wrong direction. Seems that c++ is too much complex (easy thing are
the point of arrive)
and the key word for class seems to me is not 'hide' but 'organize'
i have change;
typedef struct{
unsigned len;
unsigned* n;
}num_;
/* big integer unsigned */
class num{
public:
friend int operator==(const num& a, const num& b);
.............................
friend num& operator+(const num& a, const num& b);
.............................
friend num& operator+(const num& a, unsigned b);
.............................
num();
num(double);
num(num&r );
.............
public:
num_ numer;
unsigned mem;
unsigned fdigit;
}
// i have write a the definition of class snum
// big integer signed
class snum{
public:
snum();
snum(double);
snum(num&r );
public:
num sn;
}
// i have written a definition of class fnum
// big float
class fnum{
public:
fnum();
fnum(double);
fnum(num&r );
public:
num fn;
}
static fnum z[10];
static snum *zz = (snum*) z;
static num *zzz= (num*) z;
num g("444555");
zzz[1]=g
or something like
zzz[1].numer.n[0]=7;
or
zzz[1].numer.len =7;
*in a function member of num*
and suppose something like
snum& operator+(const snum& a, const snum& b);
{int j=index();
if(a.sn.fdigit==0)
{if(b.sn.fdigit==0)
{zz[j].sn.fdigit=0;
sum_( &zz[j].sn.numer, &a.sn.numer, &b.sn.numer); };
in a function of class snum
etc
all is accessible but the it is difficult to do errors with names
becuause they are long in a hierarchy
but why your help is "void"