• 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
Re: problem using std::remove
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem using std::remove


  • Subject: Re: problem using std::remove
  • From: Clark Cox <email@hidden>
  • Date: Tue, 22 Jun 2004 10:38:59 -0400

On Jun 22, 2004, at 01:34, Kaveh Kardan wrote:

> 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

	Have you made sure to #include <algorithm>?

--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/
http://www.livejournal.com/users/clarkcox3/

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.


References: 
 >problem using std::remove (From: Kaveh Kardan <email@hidden>)

  • Prev by Date: Re: problem using std::remove
  • Next by Date: Re: Is it possible to duplicate targets in XCode?
  • Previous by thread: Re: problem using std::remove
  • Next by thread: Build menu Compile and preprocess items are disabled.
  • Index(es):
    • Date
    • Thread