我正在尝试编写一个函数,该函数从listAccounts中删除向量元素,具体取决于该向量元素的account_name。我写了这个: void Account::remove_account(string name) {
auto iter = listAccounts.begin();
for (; iter != listAccounts.end(); iter++)
我是C++新手。我有这个代码: int main()
{
vector<int> a = { 1,2,3,4,5,6 };
vector<int> b(&a[0], &a[5]); // what's wrong? Is it completely wrong this way?
for (int i = 0; i < 6; i++) {
cout