Мертвый код в операторах Switch/Case, почему это разрешено?C++

Программы на C++. Форум разработчиков
Anonymous
Мертвый код в операторах Switch/Case, почему это разрешено?

Сообщение Anonymous »

Учитывая следующий код C ++: < /p>

Код: Выделить всё

#include 
#include 

int main()
{
auto a = std::rand();
switch (a)
{
case 1: std::cout 

Подробнее здесь: [url]https://stackoverflow.com/questions/79417351/dead-code-in-switch-case-statements-why-is-it-allowed[/url]

Вернуться в «C++»