I'd like to declare an array at the top of my method, but it's not compiling:
Foo Bar()
{
int arr[]; // C2133
// …
// C2059, C2143, C2143
arr[] = {1, 2, 3};
}
What am I doing wrong here?
UPDATE I know that C++ doesn't force me to do it this way, but the project's convention wants all variables declared at the top of their method.