C2360 compiler error on TFS build, but not on desktop
- by pdmaguire
A c++ code snippet similar to the code below caused our TFS build to fail with a C2360 compiler error.
switch (i)
{
case 0 :
for each (int n in a)
System::Console::WriteLine(n.ToString());
break;
case 1 :
System::Console::WriteLine("n is not in scope here");
break;
}
This is fixed by using {}…