Hi Mikhail,
> sizeof B=1 b=100
where is the problem? everything is correct.
Victor
Mikhail Oukhanov wrote:
>
> Dear C++Root'ers,
>
> Have you ever met the thing like this?
> How should it be handled in a streamer?
> Any hint is appreciated.
>
> Regards, Mikhail Ukhanov.
>
> ------------------------------------------------
> ukhanov@rampexa:~/mwpc$ cat qq.cxx
>
> #include <stdio.h>
>
> class B {
> public:
> B();
> private:
> static long int a;
> };
>
> long int B::a=0;
>
> B::B() {;}
>
> int main(int argc, char **argv)
> {
> B b[100];
> printf("sizeof B=%d b=%d \n",sizeof(B),sizeof(b));
> return 1;
> }
>
> ukhanov@rampexa:~/mwpc$ g++ qq.cxx -o qq
> ukhanov@rampexa:~/mwpc$ ./qq
>
> sizeof B=1 b=100
>
> ukhanov@rampexa:~/mwpc$ g++ -v
> Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.2/specs
> gcc version 2.95.2 20000220 (Debian GNU/Linux)
>
> ukhanov@rampexa:~/mwpc$ uname -a
> Linux rampexa 2.2.17 #9 Tue Jan 30 17:54:11 MSK 2001 i686 unknown
> -----------------------------------------------
--
Victor M. Perevoztchikov perev@bnl.gov perev@vxcern.cern.ch
Brookhaven National Laboratory MS 510A PO Box 5000 Upton NY 11973-5000
tel office : 631-344-7894; fax 631-344-4206; home 631-345-2690
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:48 MET