just a quick question out of curiosity: how to initialize const arrays?
struct srat
{
long num;
ulong den;
srat(){}
}
struct collisions
{
struct collision
{
srat q;
int xy;
uint x2_c2,y2_c2;
};
const collision toggle[2];
collisions(int DeltaX, int DeltaY, int off)
: toggle({{{1,2},3,4,5},{{1,2},3,4,5}})
//error: parse error before ';' token
//error: parse error before ';' token
//At global scope:
//error: parse error at end of saved function text
{
// toggle={{{1,2},3,4,5},{{1,2},3,4,5}};
}
}
and similar error when I remove this initialization list and instead use
the initialization inside of the constructor-body. also providing an
initialization as part of the declaration of toggle doesn't work since the
array isn't supposed to be static but should actually be initialized by
arguments given to the constructor. could someone decrypt those errors?
--
Better send the eMails to netscape.net, as to
evade useless burthening of my provider's /dev/null...
before complaining because of my rudeness, read
http://www.unet.univie.ac.at/~a97023...l/liar-faq.txt
and killfile me...
P