Re: problem using std::remove
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.