error(compiled by vc6.0) in the sample ?
#include "AccessList.h"
using namespace std;
void AccessList::addUser(const string& user)
{
mAllowed.insert(user);
}
void AccessList::removeUser(const string& user)
{
mAllowed.erase(user);
}
bool AccessList::isAllowed(const string& user) const
{
return (mAllowed.count(user) == 1);
}
list<string> AccessList::getAllUsers() const
{
list<string> users;
users.insert(users.end(), mAllowed.begin(), mAllowed.end());
return (users);
}
I just test a sample in the 21st chapter, but some error in it?
//compiled results:574841_ch21\accesscontrollist\accesslist.c pp(22) : error C2664: 'void __thiscall std::list<class std::basic_string<char,struct std::char_traits<char>,class std::allocator......
|