Sudoku Solver 1.0
Загрузка...
Поиск...
Не найдено
console_utils.h
См. документацию.
1#pragma once
2
3#include <string>
4#include <vector>
5
6namespace ConsoleUtils {
7
8 // Показать меню и вернуть выбранный индекс (0 .. options.size()-1)
9 int showMenu(const std::vector<std::string>& options, const std::string& prompt = "Выберите действие");
10
11 // Запрос yes/no
12 bool askYesNo(const std::string& question);
13
14 // Запрос строки
15 std::string askString(const std::string& prompt, bool allowEmpty = false);
16
17 // Запрос целого числа в диапазоне
18 int askInt(const std::string& prompt, int min, int max);
19
20 // Очистка экрана
21 void clearScreen();
22
23} // namespace ConsoleUtils
Определения console_utils.cpp:6
int askInt(const std::string &prompt, int min, int max)
Определения console_utils.cpp:67
std::string askString(const std::string &prompt, bool allowEmpty)
Определения console_utils.cpp:53
bool askYesNo(const std::string &question)
Определения console_utils.cpp:37
void clearScreen()
Определения console_utils.cpp:87
int showMenu(const std::vector< std::string > &options, const std::string &prompt)
Определения console_utils.cpp:8