/
thomas-king
/
SyntacticAnalyzer
Обзор
Документация
Войти
/
thomas-king
/
SyntacticAnalyzer
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
include/Models/NumberBase.h
48 строк
739 B
Ace Rodstin
Update models.
05 апр 2023, 15:04
05 апр 2023, 15:04
d490c58
Код
Авторство
О чём код?
// // NumberBase.h // Constants // // Created by Ace Rodstin on 4/4/23. // Copyright © 2023 Ace Rodstin. All rights reserved. // #ifndef NUMBER_BASE_HEADER_FILE #define NUMBER_BASE_HEADER_FILE #include <string> using namespace std; namespace ace { enum class NumberBase { decimal, binary, octal, hexadecimal, }; static string description(NumberBase numberBase) { string description; switch (numberBase) { case NumberBase::decimal: description = "decimal"; break; case NumberBase::binary: description = "binary"; break; case NumberBase::octal: description = "octal"; break; case NumberBase::hexadecimal: description = "hexadecimal"; break; } return description; }; } #endif