矢量我試圖刪除由if語句定義一個特定的值,然後存儲爲一個int,我希望再通過矢量外觀和使用的std ::刪除指定元素
刪除它if (comparedValuesBetween2[i] == First0ValueFor0Number2[j])
{
//make sure if there are no values to compare left just leave the the while loop by editing the count.
comparedValuesBetween2.resize(std::remove(comparedValuesBetween2.begin(), comparedValuesBetween2.end(), 8) - comparedValuesBetween2.begin());
}
但即時得到這些錯誤,我不知道爲什麼,如果你能幫助
6 IntelliSense: too many arguments in function call g:\08227 acw\ACW\Sudoku\Sudoku\main.cpp 225
5 IntelliSense: no suitable conversion function from "std::_Vector_iterator<std::_Vector_val<std::_Simple_types<int>>>" to "const char *" exists g:\08227 acw\ACW\Sudoku\Sudoku\main.cpp 225
我對C++很陌生。謝謝你的幫助。
「comparisonValuesBetween2」和「First0ValueFor0Number2」的類型可能是照亮的 – Yakk