int opc1; while (true) { system("cls"); std::cout << "------ MENU LISTAR VENDEDORES ------- " << std::endl; std::cout << "1- LISTAR POR ANTIGUEDAD" << std::endl; std::cout << "2- LISTAR POR APELLIDO" << std::endl; std::cout << "0- VOLVER AL MENU PRINCIPAL" << std::endl; opc1 = validarInt("Opcion: "); system("cls"); switch (opc1) { case 1: ListarAntiguedad(); system("pause"); break; case 2: ListarApellido(); system("pause"); break; case 0: break; } if (opc1 == 0) {// Salir del bucle del submenú si se elige la opción 3 break; } } break;