yeah. a little gotcha.
anyways, this compiles just fine under MSVS 2003 .Net
Code:int main()
{
int a1[] = {1,2,3};
int a2[sizeof(a1) / sizeof(a1[0])];
return 0;
}
Printable View
yeah. a little gotcha.
anyways, this compiles just fine under MSVS 2003 .Net
Code:int main()
{
int a1[] = {1,2,3};
int a2[sizeof(a1) / sizeof(a1[0])];
return 0;
}
On 2008, as well. The size of an array, is of course, known at compile time, so it should be legal.