how does sizeof work with array in C++
- by skydoor
Hi,
I was told the array name is a pointer
char a[] = "a"
but when
sizeof(a) = 2
why not it is a size of pointer here?
however when I define it like this
char* a ="a";
we get
sizeof(a) =4;
Well, I think I need more information about how does sizeof work with the array names....
Can anyone elaborate that?