หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
case constant 'constant' too big for the type of the switch expression
A case constant in a switch
expression does not fit in the type to which it is assigned.
Example
// C4178.cpp
// compile with: /W1 /permissive
int main()
{
unsigned int u = 1;
switch (u)
{
case 4294967295: // OK, maximum value for type unsigned int
break;
case 4294967296: // C4178, exceeded maximum value
break;
}
}