Hi Victor,
It is just the difference beween C and C++
See demo below.
Thank you,
Mikhail.
------------------------------------------------
ukhanov@rampexa:~/mwpc$ cat qq.c
#include <stdio.h>
typedef struct {
} 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$ gcc qq.c -o qq
ukhanov@rampexa:~/mwpc$ ./qq
sizeof B=0 b=0
ukhanov@rampexa:~/mwpc$ cp qq.c ww.cxx
ukhanov@rampexa:~/mwpc$ gcc ww.cxx -o ww
ukhanov@rampexa:~/mwpc$ ./ww
sizeof B=1 b=100
On Tue, 5 Jun 2001, Victor Perevoztchikov wrote:
>
> Hi Mikhail,
>
> > sizeof B=1 b=100
>
> where is the problem? everything is correct.
>
> Victor
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:48 MET