9
我有以下代碼:解析一對整數與提升精神
std::string test("1.1");
std::pair<int, int> d;
bool r = qi::phrase_parse(
test.begin(),
test.end(),
qi::int_ >> '.' >> qi::int_,
space,
d
);
所以我試圖解析字符串測試,並將結果存放在標準::對d。但它不起作用,我懷疑它與Compound Attribute Rules有關。
任何提示如何讓這個工作?
編譯器錯誤是:
error: no matching function for call to 'std::pair::pair(const int&)'
完美的工作..它寫在文檔的某個地方?我找不到它,但也許我只是忽略了它。 – mortenvp 2011-02-02 15:28:42