mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-08 00:25:28 +13:00
Updated Music Disassembler to support more advanced parameters
hg-commit-id: 0aba4647e4f6
This commit is contained in:
parent
6fe067d939
commit
4256973472
6 changed files with 203 additions and 62 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
// Just a Console Utility Library
|
||||
class Console
|
||||
|
|
@ -19,11 +20,22 @@ public:
|
|||
static void ErrorLn(const char* value);
|
||||
|
||||
// Higher
|
||||
static void Ask(const char* question, char* answer);
|
||||
static void Ask(const char* question, std::string& answer);
|
||||
//static void Ask(const char* question, char* answer);
|
||||
//static void Ask(const char* question, std::string& answer);
|
||||
|
||||
// Better Error Handling
|
||||
static int atoi_ex(const char* input, bool supress = false);
|
||||
template<class T>
|
||||
static void Ask(const char* question, T& answer, std::ios_base::fmtflags flags = std::ios_base::dec)
|
||||
{
|
||||
std::stringstream _tmpstr;
|
||||
std::string _tmp;
|
||||
|
||||
Print(question);
|
||||
Get(_tmp);
|
||||
|
||||
_tmpstr << _tmp;
|
||||
_tmpstr.flags(flags);
|
||||
_tmpstr >> answer;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CONSOLE_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue