N
news.aon.at
Hello,
what is the expected behaviour for
mem()
vs.
mem(0)
vs.
no - init at all
for a long class member?
sample:
#include <stdio.h>
class Foo
{
public:
Foo()
: m1()
, m2()
, m3()
{
printf("m1=%d,m2=%d,m3=%d,m4=%d,m5=%d\n",m1,m2,m3,m4,m5);
}
virtual ~Foo() {}
long m1;
long m2;
long m3;
long m4;
long m5;
};
int main(int argc,char *argv[])
{
Foo aFoo;
Foo * aFoo2 = new Foo();
return 0;
}
i have an old compiler which does not init any of the vars and a very new
compiler which inits m1 , m2 , m3 with 0 and not m4 and m5.
what is the expected behaviour for
mem()
vs.
mem(0)
vs.
no - init at all
for a long class member?
sample:
#include <stdio.h>
class Foo
{
public:
Foo()
: m1()
, m2()
, m3()
{
printf("m1=%d,m2=%d,m3=%d,m4=%d,m5=%d\n",m1,m2,m3,m4,m5);
}
virtual ~Foo() {}
long m1;
long m2;
long m3;
long m4;
long m5;
};
int main(int argc,char *argv[])
{
Foo aFoo;
Foo * aFoo2 = new Foo();
return 0;
}
i have an old compiler which does not init any of the vars and a very new
compiler which inits m1 , m2 , m3 with 0 and not m4 and m5.