「🔨」 fix: fixed some things.
This commit is contained in:
@@ -158,7 +158,7 @@ void BitcoinExchange::str(std::string filename)
|
|||||||
std::cout << "Error: bad input => " << line << std::endl;
|
std::cout << "Error: bad input => " << line << std::endl;
|
||||||
continue ;
|
continue ;
|
||||||
}
|
}
|
||||||
if (std::atol(value_str.c_str()) > 2147483647)
|
if (std::atol(value_str.c_str()) > 1000)
|
||||||
{
|
{
|
||||||
std::cout << "Error: too large a number." << std::endl;
|
std::cout << "Error: too large a number." << std::endl;
|
||||||
continue ;
|
continue ;
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ typedef int (*OperatorFunctions)(int, int);
|
|||||||
void rpn(char *av)
|
void rpn(char *av)
|
||||||
{
|
{
|
||||||
OperatorFunctions calc[128] = { NULL };
|
OperatorFunctions calc[128] = { NULL };
|
||||||
calc['+'] = &add;
|
calc[(int) '+'] = &add;
|
||||||
calc['-'] = &subst;
|
calc[(int) '-'] = &subst;
|
||||||
calc['*'] = &mult;
|
calc[(int) '*'] = &mult;
|
||||||
calc['/'] = ÷
|
calc[(int) '/'] = ÷
|
||||||
|
|
||||||
std::istringstream ss_input((std::string(av)));
|
std::istringstream ss_input((std::string(av)));
|
||||||
std::stack<int> stack;
|
std::stack<int> stack;
|
||||||
|
|||||||
Reference in New Issue
Block a user