• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
problem using std::remove
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem using std::remove


  • Subject: problem using std::remove
  • From: Kaveh Kardan <email@hidden>
  • Date: Mon, 21 Jun 2004 19:34:47 -1000

I have the following piece of code:

std::remove(vec.begin(), vec.end(), 3);

which XCode refuses to compile.  It thinks that the prototype is found
in stdio.h:

int	 remove(const char *);

and complains of a type mismatch:

bzList.cpp:86: error: cannot convert
`__gnu_cxx::__normal_iterator<int*, std::vector<int,
std::allocator<int> > >' to `const char*' for argument `1' to `int
remove(const char*)'

Anyone know how to fix this?  None of my project files even includes
stdio.h

Kaveh

Kaveh Kardan                 Chief Technologist
email@hidden             Academy for Creative Media
(808)956-5302                University of Hawaii
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: problem using std::remove
      • From: Clark Cox <email@hidden>
    • Re: problem using std::remove
      • From: Ryan Wilcox <email@hidden>
  • Prev by Date: build phase question
  • Next by Date: Re: problem using std::remove
  • Previous by thread: build phase question
  • Next by thread: Re: problem using std::remove
  • Index(es):
    • Date
    • Thread