作者suspect1 (嫌犯)
看板EE_DSnP
標題[問題] 錯誤訊息
時間Thu Dec 14 23:43:23 2006
請問以下是什麼意思?
memTest.cpp:77: error: passing `const std::string' as `this' argument of
`std::b asic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>
::erase(typename _Alloc::size_type, typename _Alloc::size_type)
[with _CharT = c har, _Traits = std::char_traits<char>,
_Alloc = std::allocator<char>]' discards qualifiers
發生錯誤這行我寫的是
memTest.cpp:77 -> option.erase() ;
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.4.242
推 timrau:option的data type? 12/14 23:47
→ timrau:而且erase()應該需要傳入至少一個iterator吧? 12/14 23:47