C/C++の宿題やらせてください。おながいします
■ このスレッドは過去ログ倉庫に格納されています
0618電卓ならこうでしょ。
NGNG#include <iostream>
#include <stack>
#include <functional>
#include <string>
using namespace std;
using namespace boost::spirit;
struct push_int {
push_int(stack<long>& eval_) : eval(eval_) {}
void operator()(char const* str, char const* /*end*/) const {
long n = strtol(str, 0, 10);
eval.push(n);
cout << "push\t" << long(n) << endl;
}
stack<long>& eval;
};
■ このスレッドは過去ログ倉庫に格納されています