Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > BOOK: Professional C++
|
BOOK: Professional C++
This is the forum to discuss the Wrox book Professional C++ by Nicholas A. Solter, Scott J. Kleper; ISBN: 9780764574849
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 16th, 2008, 04:35 AM
Registered User
 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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......
 
Old August 23rd, 2008, 02:55 AM
Registered User
 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok! No error in g++.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiled error of executing chapter2 source code williamlin BOOK Beginning Linux Programming, 3rd Edition 10 August 25th, 2006 10:23 AM
Moved from VC6 to VC2003 synaptic Visual C++ 2 August 19th, 2005 09:38 AM
SHDOCVW giving error on compiled run WarriorKing Pro VB 6 3 December 20th, 2004 12:10 PM
ListView Sample code - error? Mithrandir VB.NET 2002/2003 Basics 0 August 10th, 2003 12:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.